Class extended_pred_symbol

Inheritance Relationships

Base Types

Derived Type

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 three extended_pred_symbols are created for the cooked 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 the getParent function.

Because multiple extended_pred_symbols are created for each PDDL predicate, care must be taken when interpreting the results of methods such as appearsStatic() - 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, use getParent() then with this iterate through all the derived extended_pred_symbols.

Subclassed by TIM::TIMpredSymbol

Public Types

typedef vector<OpProp> OpProps

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(operator_ *o)
inline void addPre(derivation_rule *o)
inline void addAdd(operator_ *o)
inline void addAdd(derivation_rule *o)
inline void addDel(operator_ *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 Types::iterator tBegin()
inline Types::iterator tEnd()
inline Types::const_iterator tcBegin() const
inline Types::const_iterator tcEnd() const
inline OpProps::const_iterator posPresBegin() const
inline OpProps::const_iterator posPresEnd() const
inline OpProps::const_iterator addsBegin() const
inline OpProps::const_iterator addsEnd() const
inline OpProps::const_iterator delsBegin() const
inline OpProps::const_iterator delsEnd() const
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_symbols, 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 the extended_pred_symbols 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_symbols, 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
inline PropStore *getInitials()
vector<double> getTimedAchievers(Environment *f, const proposition *prop) const

Protected Functions

PropStore *records() const
PropStore *getAt(double t) const

Protected Attributes

holding_pred_symbol *parent

The predicate parent of this object, common amongst all extended_pred_symbols derived from the same base PDDL predicate.

Types types
int posgoalState
int neggoalState
OpProps pospreconds
OpProps negpreconds
OpProps adds
OpProps dels
PropStore *props
map<double, PropStore*> timedInitials
bool owner