pddl_planner
Public Member Functions | Public Attributes | List of all members
pddl_planner::representation::Domain Struct Reference

An internal representation of a PDDL domain description. More...

#include <Domain.hpp>

Public Member Functions

 Domain (const std::string &name="")
 
void addType (const Type &type, const Type &parentType="")
 
void addConstant (const TypedItem &type, bool overwrite=false)
 
void addPredicate (const Predicate &predicate, bool overwrite=false)
 
void addRequirement (const Requirement &requirement)
 
void addAction (const Action &action, bool overwrite=false)
 
void addFunction (const Function &function, bool overwrite=false)
 
void removeConstant (const Label &label)
 
void removePredicate (const Label &label)
 
void removeAction (const Label &label)
 
void removeFunction (const Label &label)
 
bool isType (const Type &type) const
 
bool isConstant (const Label &label) const
 
bool isPredicate (const Label &label) const
 
bool isRequirement (const Requirement &requirement) const
 
bool isAction (const Label &label) const
 
bool isFunction (const Label &label) const
 
Predicate getPredicate (const Label &label) const
 
Action getAction (const Label &label) const
 
std::string toLISP () const
 
bool hasName () const
 
bool isNull () const
 
void validate (const Expression &e, const VariableManager &variableManager=VariableManager()) const
 
void validate () const
 

Public Attributes

std::string name
 
TypeList types
 
std::map< Type, Typetype2parent
 
ConstantList constants
 
PredicateList predicates
 
RequirementList requirements
 
ActionList actions
 
FunctionList functions
 

Detailed Description

An internal representation of a PDDL domain description.

This class allows to programmatically build a PDDL domain description and allow to export the current state in LISP format

Currently, the domain requires 'typing' support by default

Constructor & Destructor Documentation

pddl_planner::representation::Domain::Domain ( const std::string &  name = "")

Default domain constructor

Parameters
nameName of the domain

Member Function Documentation

void pddl_planner::representation::Domain::addAction ( const Action action,
bool  overwrite = false 
)
void pddl_planner::representation::Domain::addConstant ( const TypedItem type,
bool  overwrite = false 
)
void pddl_planner::representation::Domain::addFunction ( const Function function,
bool  overwrite = false 
)
void pddl_planner::representation::Domain::addPredicate ( const Predicate predicate,
bool  overwrite = false 
)
void pddl_planner::representation::Domain::addRequirement ( const Requirement requirement)
void pddl_planner::representation::Domain::addType ( const Type type,
const Type parentType = "" 
)

Add a domain type

Parameters
typeType definition
Action pddl_planner::representation::Domain::getAction ( const Label label) const
Predicate pddl_planner::representation::Domain::getPredicate ( const Label label) const
bool pddl_planner::representation::Domain::hasName ( ) const
inline

Check if domain has a name

Returns
true if name is given, false otherwise
bool pddl_planner::representation::Domain::isAction ( const Label label) const
bool pddl_planner::representation::Domain::isConstant ( const Label label) const
bool pddl_planner::representation::Domain::isFunction ( const Label label) const
bool pddl_planner::representation::Domain::isNull ( ) const
inline

Check if a properly named domain definition is given

Returns
true if domain is defined, false otherwise
bool pddl_planner::representation::Domain::isPredicate ( const Label label) const
bool pddl_planner::representation::Domain::isRequirement ( const Requirement requirement) const
bool pddl_planner::representation::Domain::isType ( const Type type) const
void pddl_planner::representation::Domain::removeAction ( const Label label)
void pddl_planner::representation::Domain::removeConstant ( const Label label)
void pddl_planner::representation::Domain::removeFunction ( const Label label)
void pddl_planner::representation::Domain::removePredicate ( const Label label)
std::string pddl_planner::representation::Domain::toLISP ( ) const
void pddl_planner::representation::Domain::validate ( const Expression e,
const VariableManager variableManager = VariableManager() 
) const

Validate an expression using a given variable manager

Exceptions
std::runtime_errorif expression is not properly defined
void pddl_planner::representation::Domain::validate ( ) const

Perform a simple syntax check

Exceptions
std::runtime_errorif expression is not properly defined

Member Data Documentation

ActionList pddl_planner::representation::Domain::actions
ConstantList pddl_planner::representation::Domain::constants
FunctionList pddl_planner::representation::Domain::functions
std::string pddl_planner::representation::Domain::name
PredicateList pddl_planner::representation::Domain::predicates
RequirementList pddl_planner::representation::Domain::requirements
std::map<Type,Type> pddl_planner::representation::Domain::type2parent
TypeList pddl_planner::representation::Domain::types

The documentation for this struct was generated from the following files: