|
Fawkes API
Fawkes Development Version
|
Translate a PDDL effect into CLIPS facts. More...
#include "effect_visitor.h"

Public Member Functions | |
| EffectToCLIPSFactVisitor (const std::string &pddl_operator, bool positive) | |
| Constructor. More... | |
| std::vector< std::string > | operator() (pddl_parser::Atom &a) const |
| Translate an Atom into a vector of strings. More... | |
| std::vector< std::string > | operator() (pddl_parser::Predicate &p) const |
| Translate a Predicate into a vector of strings. More... | |
Translate a PDDL effect into CLIPS facts.
Definition at line 30 of file effect_visitor.h.
| EffectToCLIPSFactVisitor::EffectToCLIPSFactVisitor | ( | const std::string & | pddl_operator, |
| bool | positive | ||
| ) |
Constructor.
| pddl_operator | The name of the operator this effect belongs to. |
| positive | True iff this is a positive (not a negative) effect. |
Definition at line 38 of file effect_visitor.cpp.
Referenced by operator()().
| vector< string > EffectToCLIPSFactVisitor::operator() | ( | pddl_parser::Atom & | a | ) | const |
Translate an Atom into a vector of strings.
Note that this does not return a CLIPS fact because we do not store atoms (parameter names or constants) as separate facts. This needs to be further processed by the caller instead.
| a | The atom to translate into a string. |
Definition at line 51 of file effect_visitor.cpp.
| vector< string > EffectToCLIPSFactVisitor::operator() | ( | pddl_parser::Predicate & | p | ) | const |
Translate a Predicate into a vector of strings.
This creates proper CLIPS effect fact strings for the Predicate and all its arguments. For compound formulae (e.g., conjunctions), this also translates all sub-formulae recursively.
| p | The predicate to translate. |
Definition at line 64 of file effect_visitor.cpp.
References pddl_parser::Predicate::arguments, EffectToCLIPSFactVisitor(), and pddl_parser::Predicate::function.