Preparing more general form of PDDL normalization.

This commit is contained in:
Patrick Lühne 2016-09-02 16:39:42 +02:00
parent 8361f3767b
commit c528626fe9
5 changed files with 14 additions and 5 deletions

View File

@ -35,7 +35,7 @@ class Description
bool containsProblem() const;
const Problem &problem() const;
void normalizeParameterNames();
void normalize();
private:
Description();

View File

@ -51,7 +51,7 @@ class Domain
void checkConsistency();
void normalizeParameterNames();
void normalize();
private:
void parseSection();
@ -67,6 +67,8 @@ class Domain
void parseActionSection();
void normalizeParameterNames();
Context &m_context;
std::string m_name;

View File

@ -204,9 +204,9 @@ void Description::checkConsistency()
////////////////////////////////////////////////////////////////////////////////////////////////////
void Description::normalizeParameterNames()
void Description::normalize()
{
m_domain->normalizeParameterNames();
m_domain->normalize();
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -415,6 +415,13 @@ void Domain::checkConsistency()
////////////////////////////////////////////////////////////////////////////////////////////////////
void Domain::normalize()
{
normalizeParameterNames();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
void Domain::normalizeParameterNames()
{
std::for_each(m_predicates.begin(), m_predicates.end(),

View File

@ -23,7 +23,7 @@ TranslatorASP::TranslatorASP(Description &description, utils::LogStream &outputS
: m_description(description),
m_outputStream(outputStream)
{
m_description.normalizeParameterNames();
m_description.normalize();
}
////////////////////////////////////////////////////////////////////////////////////////////////////