Class extended_pred_symbol
Defined in File Analyser.h
Inheritance Relationships
Base Types
public VAL::pred_symbol
(Class pred_symbol)public VAL::pred_symbol
(Class pred_symbol)
Derived Type
public TIM::TIMpredSymbol
(Class TIMpredSymbol)
Class Documentation
-
class extended_pred_symbol : public VAL::pred_symbol, public VAL::pred_symbol
A class representing a predicate symbol, with a given combination of typed parameters. TIM creates a
extended_pred_symbol
for each combination of types and sub-types that can be passed to a given predicate. For instance, if we have the PDDL type structure(tea toast - item)
, and a predicate(cooked ?i - item)
, then threeextended_pred_symbol
s are created for thecooked
predicate:one where the type of the item was typed in the problem definition as
tea
one where the type of the item was typed in the problem definition as
toast
one where the type of the item was typed in the problem definition as
item
Each of these three has a common parent, a
holding_pred_symbol
, which can be obtained by using thegetParent
function.Because multiple
extended_pred_symbol
s are created for each PDDL predicate, care must be taken when interpreting the results of methods such asappearsStatic()
- this will, for instance, report whether a given typed variant of the predicate is static, not necessarily whether the base PDDL predicate is static. To ascertain properties of the base predicate as a whole, usegetParent()
then with this iterate through all the derivedextended_pred_symbol
s.See also
Subclassed by TIM::TIMpredSymbol
Public Functions
-
inline extended_pred_symbol(const string &nm)
-
inline void setGoal()
-
inline void setInitial()
-
inline int isGoal() const
-
inline int isInitial() const
-
inline bool isStatic() const
-
inline bool decays() const
-
inline void addPre(derivation_rule *o)
-
inline void addAdd(derivation_rule *o)
-
inline virtual void write(ostream &o) const
-
inline virtual void display(int i) const
-
inline virtual void visit(VisitController *v) const
-
inline virtual ~extended_pred_symbol()
-
inline extended_pred_symbol(pred_symbol *nm, proposition *p)
-
template<class TI>
inline extended_pred_symbol(pred_symbol *nm, TI s, TI e)
-
inline int arity() const
-
inline holding_pred_symbol *getParent() const
The parent of the current object. The use of type inheritance introduces multiple
extended_pred_symbol
s, one for each combination of types and sub-types that can be used with that predicate in the domain and problem definition. The parent returned by this function is identical for all theextended_pred_symbol
s derived from the same PDDL predicate.- Returns:
The parent of the current object, common amongst all predicates with this object’s name.
-
inline void setParent(holding_pred_symbol *h)
Specify the parent of the current object. The use of type inheritance introduces multiple
extended_pred_symbol
s, one for each combination of types and sub-types that can be used with that predicate in the domain and problem definition.- Parameters:
h – The parent of the current
extended_pred_symbol
. This should be common amongst all predicates derived from the same PDDL predicate as this one (i.e. with the same name).
-
inline void setGoal(const bool &posGl)
-
inline void setInitial(proposition *p)
-
inline void setInitialPos(proposition *p, double t)
-
inline void setInitialNeg(proposition *p, double t)
-
inline int isPosGoal() const
-
inline int isNegGoal() const
-
inline int isInitial() const
-
inline bool isStatic() const
-
inline bool isCompletelyStatic(FastEnvironment *f, const proposition *p) const
-
inline bool cannotIncrease() const
-
inline bool isDefinitelyStatic() const
-
inline bool isPrimitiveType() const
-
inline extended_pred_symbol *getPrimitive(FastEnvironment *f, const proposition *p)
-
inline bool appearsStatic() const
-
inline bool decays() const
-
inline void addPosPre(operator_ *o, const proposition *p)
-
inline void addNegPre(operator_ *o, const proposition *p)
-
inline void addAdd(operator_ *o, const proposition *p)
-
inline void addDel(operator_ *o, const proposition *p)
-
inline void addPosPre(derivation_rule *o, const proposition *p)
-
inline void addNegPre(derivation_rule *o, const proposition *p)
-
inline void addAdd(derivation_rule *o, const proposition *p)
-
inline void writeName(ostream &o) const
-
inline virtual void write(ostream &o) const
-
inline virtual void visit(VisitController *v) const
-
inline bool contains(FastEnvironment *f, const proposition *p) const
-
inline bool partContains(FastEnvironment *f, const proposition *p) const
-
vector<double> getTimedAchievers(Environment *f, const proposition *prop) const
Protected Attributes
-
holding_pred_symbol *parent
The predicate parent of this object, common amongst all
extended_pred_symbol
s derived from the same base PDDL predicate.
-
int posgoalState
-
int neggoalState
-
bool owner