Fawkes API
Fawkes Development Version
|
Functor for semantic checks when parsing actions of a PDDL domain. More...
#include <pddl_semantics.h>
Public Member Functions | |
Action | operator() (const iterator_type &where, const Action &parsed, const Domain &domain) const |
Check whether the parameter list is properly typed and all expressions that express conditions/effects are well-formed in the domain. More... | |
Static Public Member Functions | |
static bool | check_type (const iterator_type &where, const std::string &got, const std::string &expected, const Domain &domain) |
Helper to check whether a type matches the expected one. More... | |
static void | check_action_condition (const iterator_type &where, const Expression &expr, const Domain &domain, const Action &action, string_pairs_type &bound_vars) |
Helper to recursively check expression semantics within precondition and effects of actions. More... | |
static void | check_action_predicate (const iterator_type &where, const Predicate &pred, const ExpressionType &type, const Domain &domain, const Action &action, string_pairs_type &bound_vars) |
Helper to recursively check expression semantics within predicates. More... | |
Functor for semantic checks when parsing actions of a PDDL domain.
Definition at line 131 of file pddl_semantics.h.
|
static |
Helper to recursively check expression semantics within precondition and effects of actions.
where | Position of the parsed action. |
expr | Expression to be checked. |
domain | Partial domain containing everything that was parsed so far. |
action | Action containing the expression to check. |
bound_vars | Variables that are bound through quantified formulas on an upper recursion level. |
Definition at line 175 of file pddl_semantics.cpp.
References pddl_parser::QuantifiedFormula::args, pddl_parser::Expression::expression, pddl_parser::QuantifiedFormula::sub_expr, and pddl_parser::Expression::type.
|
static |
Helper to recursively check expression semantics within predicates.
where | Position of the parsed action. |
pred | Predicate to be checked. |
type | Expression type of the predicate. |
domain | Partial domain containing everything that was parsed so far. |
action | Action containing the expression to check. |
bound_vars | Variables that are bound through quantified formulas on an upper recursion level. |
Definition at line 201 of file pddl_semantics.cpp.
References pddl_parser::Action::action_params, pddl_parser::Predicate::arguments, pddl_parser::Domain::constants, pddl_parser::Predicate::function, and pddl_parser::Domain::predicates.
|
static |
Helper to check whether a type matches the expected one.
Recursively steps up the type hierarchy until the expected type is found or the topmost level is reached.
where | Position of the parsed action. |
got | Type that has to be checked. |
expected | Type that is to be matched. |
domain | partial domain containing everything that was parsed so far |
Definition at line 155 of file pddl_semantics.cpp.
References pddl_parser::Domain::types.
Action pddl_parser::ActionSemantics::operator() | ( | const iterator_type & | where, |
const Action & | parsed, | ||
const Domain & | domain | ||
) | const |
Check whether the parameter list is properly typed and all expressions that express conditions/effects are well-formed in the domain.
where | Position of the parsed action. |
parsed | Action that got parsed. |
domain | Partial domain containing everything that was parsed so far. |
Definition at line 127 of file pddl_semantics.cpp.
References pddl_parser::Action::action_params, pddl_parser::Action::effect, pddl_parser::Action::precondition, and pddl_parser::Domain::types.