21#ifndef PLUGINS_PDDL_SEMANTICS_H
22#define PLUGINS_PDDL_SEMANTICS_H
28namespace pddl_parser {
43 return std::type_index(
typeid(a));
52 return std::type_index(
typeid(p));
61 return std::type_index(
typeid(p));
79 operator()(
const iterator_type &where,
const pair_type &parsed,
const Domain &domain)
const;
101 pair_type
operator()(
const iterator_type & where,
102 const pair_strings_type &parsed,
103 string_pairs_type & target)
const;
122 pair_multi_const
operator()(
const iterator_type & where,
123 const pair_multi_const & parsed,
125 std::vector<std::string> &warnings)
const;
145 static bool check_type(
const iterator_type &where,
146 const std::string & got,
147 const std::string & expected,
165 string_pairs_type & bound_vars);
179 const ExpressionType &type,
182 string_pairs_type & bound_vars);
Functor for semantic checks when parsing actions of a PDDL domain.
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.
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/effect...
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.
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.
A structured representation of a PDDL action.
Functor for semantic checks when parsing constants of a PDDL domain.
pair_multi_const operator()(const iterator_type &where, const pair_multi_const &parsed, const Domain &domain, std::vector< std::string > &warnings) const
Check whether the given type for a set of constants is defined and registers warnings if constants ar...
A structured representation of a PDDL domain.
Retrieve the type index of an expression_t expression to determine the underlying type of the variant...
std::type_index operator()(const Predicate &p) const
Visitor for Predicate.
std::type_index operator()(const QuantifiedFormula &p) const
Visitor for QuantifiedFormula.
std::type_index operator()(const Atom &a) const
Visitor for Atom.
A PDDL formula (either part of a precondition or an effect(.
Functor for semantic checks when parsing PDDL types.
pair_type operator()(const iterator_type &where, const pair_type &parsed, const Domain &domain) const
Throw an exception if the parsed type is a sub-type but the domain does not have the requirement :typ...