23#ifndef PLUGINS_PDDL_AST_H_
24#define PLUGINS_PDDL_AST_H_
26#include <boost/fusion/include/adapt_struct.hpp>
27#include <boost/fusion/include/std_pair.hpp>
28#include <boost/spirit/include/qi.hpp>
29#include <boost/spirit/include/support_line_pos_iterator.hpp>
33namespace pddl_parser {
34namespace qi = boost::spirit::qi;
35namespace ascii = boost::spirit::ascii;
37typedef std::pair<std::string, std::string> pair_type;
38typedef std::vector<pair_type> pairs_type;
40typedef std::vector<std::string> type_list;
41typedef std::pair<type_list, std::string> pair_multi_const;
42typedef std::vector<pair_multi_const> pairs_multi_consts;
43typedef std::pair<std::vector<std::string>, std::vector<std::string>> pair_strings_type;
45typedef std::pair<std::string, std::string> string_pair_type;
46typedef std::vector<string_pair_type> string_pairs_type;
47typedef std::pair<std::string, string_pairs_type> predicate_type;
49typedef boost::spirit::line_pos_iterator<std::string::const_iterator> iterator_type;
51using Atom = std::string;
54struct QuantifiedFormula;
71 variant<Atom, boost::recursive_wrapper<Predicate>, boost::recursive_wrapper<QuantifiedFormula>>
A structured representation of a PDDL action.
Expression duration
The action duration in temporal domains.
Expression cond_breakup
Used by the STN generator to determine conditional break points in the STN.
string_pairs_type action_params
A typed list of action parameters.
std::string name
The name of the action.
Expression effect
The effect of an action.
Expression temp_breakup
Used by the STN generator to determine temporal break points in the STN.
Expression precondition
The precondition of an action.
A structured representation of a PDDL domain.
std::vector< Action > actions
A list of actions defined in the domain.
std::string name
The name of the domain.
pairs_multi_consts constants
A typed list of constants defined in the domain.
pairs_type types
A list of types with their super types.
std::vector< predicate_type > predicates
A list of predicate names in the domain, including the types of their arguments.
std::vector< std::string > requirements
A list of PDDL features required by the domain.
std::vector< Function > functions
A list of numeric functions in the domain.
expression_t expression
The expression formula.
ExpressionType type
The type of the expression, determined at parsing time.
A structured representation of a PDDL function.
std::string name
The name of the function.
string_pairs_type object_params
A typed list of function parameters.
A PDDL formula (either part of a precondition or an effect(.
std::vector< Expression > arguments
The arguments of the predicate or the subformulae of the compound formula.
Atom function
The name of the predicate for atomic formulae, 'and' for a conjunction, 'or' for a disjunction,...
A structured representation of a PDDL problem.
std::string name
The name of the problem.
pairs_multi_consts objects
A typed list of objects in the domain.
Expression goal
The goal of the problem.
std::vector< Expression > init
A list of facts that are initially true.
std::string domain_name
The name of the domain this problem belongs to.