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

Public Member Functions | |
| PreconditionToCLIPSFactVisitor (const std::string &parent, int sub_counter, bool is_main=false) | |
| 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 precondition into CLIPS facts.
Definition at line 30 of file precondition_visitor.h.
| PreconditionToCLIPSFactVisitor::PreconditionToCLIPSFactVisitor | ( | const std::string & | parent, |
| int | sub_counter, | ||
| bool | is_main = false |
||
| ) |
Constructor.
| parent | The name of the parent (either an operator or a precondition) |
| sub_counter | Counter passed by the parent to enumerate sub-conditions |
| is_main | true if this is the direct child of the operator, i.e., not a sub-condition |
Definition at line 41 of file precondition_visitor.cpp.
Referenced by operator()().
| vector< string > PreconditionToCLIPSFactVisitor::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 56 of file precondition_visitor.cpp.
| vector< string > PreconditionToCLIPSFactVisitor::operator() | ( | pddl_parser::Predicate & | p | ) | const |
Translate a Predicate into a vector of strings.
This creates proper CLIPS precondition 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 69 of file precondition_visitor.cpp.
References pddl_parser::Predicate::arguments, pddl_parser::Predicate::function, and PreconditionToCLIPSFactVisitor().