2016-06-10 17:40:32 +02:00
|
|
|
#ifndef __PLASP__PDDL__TRANSLATOR_ASP_H
|
|
|
|
#define __PLASP__PDDL__TRANSLATOR_ASP_H
|
|
|
|
|
|
|
|
#include <plasp/pddl/Description.h>
|
|
|
|
|
|
|
|
#include <iosfwd>
|
|
|
|
|
|
|
|
namespace plasp
|
|
|
|
{
|
|
|
|
namespace pddl
|
|
|
|
{
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// TranslatorASP
|
|
|
|
//
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
class TranslatorASP
|
|
|
|
{
|
|
|
|
public:
|
2016-06-12 22:31:18 +02:00
|
|
|
explicit TranslatorASP(const Description &description, std::ostream &ostream);
|
2016-06-10 17:40:32 +02:00
|
|
|
|
2016-06-12 22:31:18 +02:00
|
|
|
void translate() const;
|
2016-06-10 17:40:32 +02:00
|
|
|
|
2016-06-12 22:19:55 +02:00
|
|
|
private:
|
|
|
|
void checkSupport() const;
|
2016-06-10 17:40:32 +02:00
|
|
|
|
2016-06-12 22:31:18 +02:00
|
|
|
void translateDomain() const;
|
2016-06-12 22:39:04 +02:00
|
|
|
void translateTypes() const;
|
|
|
|
void translateConstants() const;
|
|
|
|
void translatePredicates() const;
|
2016-06-12 22:47:39 +02:00
|
|
|
void translateActions() const;
|
2016-06-12 22:39:04 +02:00
|
|
|
|
2016-06-12 22:31:18 +02:00
|
|
|
void translateProblem() const;
|
2016-06-13 02:48:16 +02:00
|
|
|
void translateObjects() const;
|
2016-06-13 02:59:43 +02:00
|
|
|
void translateInitialState() const;
|
2016-06-10 17:40:32 +02:00
|
|
|
|
2016-06-13 02:38:56 +02:00
|
|
|
void translateVariablesHead(const expressions::Variables &variables) const;
|
|
|
|
void translateVariablesBody(const expressions::Variables &variables) const;
|
|
|
|
void translatePredicate(const expressions::Predicate &predicate) const;
|
2016-06-12 22:55:35 +02:00
|
|
|
|
2016-06-10 17:40:32 +02:00
|
|
|
const Description &m_description;
|
2016-06-12 22:31:18 +02:00
|
|
|
std::ostream &m_ostream;
|
2016-06-10 17:40:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|