Implemented parameter name normalization for PDDL to avoid escaping the names.
This commit is contained in:
@@ -30,6 +30,8 @@ class Action
|
||||
const Expression *precondition() const;
|
||||
const Expression *effect() const;
|
||||
|
||||
void normalizeParameterNames();
|
||||
|
||||
private:
|
||||
Action() = default;
|
||||
|
||||
|
@@ -35,6 +35,8 @@ class Description
|
||||
bool containsProblem() const;
|
||||
const Problem &problem() const;
|
||||
|
||||
void normalizeParameterNames();
|
||||
|
||||
private:
|
||||
Description();
|
||||
|
||||
|
@@ -51,6 +51,8 @@ class Domain
|
||||
|
||||
void checkConsistency();
|
||||
|
||||
void normalizeParameterNames();
|
||||
|
||||
private:
|
||||
void parseSection();
|
||||
|
||||
|
@@ -19,7 +19,7 @@ namespace pddl
|
||||
class TranslatorASP
|
||||
{
|
||||
public:
|
||||
explicit TranslatorASP(const Description &description, utils::LogStream &outputStream);
|
||||
explicit TranslatorASP(Description &description, utils::LogStream &outputStream);
|
||||
|
||||
void translate() const;
|
||||
|
||||
@@ -39,7 +39,7 @@ class TranslatorASP
|
||||
void translateLiteral(const Expression &literal) const;
|
||||
void translatePredicate(const expressions::Predicate &predicate) const;
|
||||
|
||||
const Description &m_description;
|
||||
Description &m_description;
|
||||
utils::LogStream &m_outputStream;
|
||||
};
|
||||
|
||||
|
@@ -29,6 +29,8 @@ class PredicateDeclaration: public ExpressionCRTP<PredicateDeclaration>
|
||||
|
||||
bool isDeclared() const;
|
||||
|
||||
void normalizeParameterNames();
|
||||
|
||||
private:
|
||||
PredicateDeclaration();
|
||||
|
||||
|
@@ -28,7 +28,9 @@ class Variable: public ExpressionCRTP<Variable>
|
||||
const ExpressionContext &expressionContext);
|
||||
|
||||
public:
|
||||
void setName(std::string name);
|
||||
const std::string &name() const;
|
||||
|
||||
const Expression *type() const;
|
||||
|
||||
void setDirty(bool isDirty = true);
|
||||
|
Reference in New Issue
Block a user