This repository has been archived on 2023-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
2017-08-09 17:52:50 +02:00
|
|
|
#include <pddl/detail/normalization/AtomicFormula.h>
|
2017-06-23 04:18:07 +02:00
|
|
|
|
2017-08-09 17:52:50 +02:00
|
|
|
#include <pddl/AST.h>
|
|
|
|
#include <pddl/Exception.h>
|
|
|
|
#include <pddl/NormalizedAST.h>
|
2017-06-23 04:18:07 +02:00
|
|
|
|
|
|
|
namespace pddl
|
|
|
|
{
|
|
|
|
namespace detail
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// AtomicFormula
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
normalizedAST::AtomicFormula normalize(ast::AtomicFormula &&atomicFormula)
|
|
|
|
{
|
|
|
|
const auto handlePredicate =
|
|
|
|
[&](ast::PredicatePointer &predicate) -> normalizedAST::AtomicFormula
|
|
|
|
{
|
|
|
|
return std::move(predicate);
|
|
|
|
};
|
|
|
|
|
2017-06-24 20:27:01 +02:00
|
|
|
return atomicFormula.match(handlePredicate);
|
2017-06-23 04:18:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|