Preparing more general form of PDDL normalization.
This commit is contained in:
parent
8361f3767b
commit
c528626fe9
|
@ -35,7 +35,7 @@ class Description
|
||||||
bool containsProblem() const;
|
bool containsProblem() const;
|
||||||
const Problem &problem() const;
|
const Problem &problem() const;
|
||||||
|
|
||||||
void normalizeParameterNames();
|
void normalize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Description();
|
Description();
|
||||||
|
|
|
@ -51,7 +51,7 @@ class Domain
|
||||||
|
|
||||||
void checkConsistency();
|
void checkConsistency();
|
||||||
|
|
||||||
void normalizeParameterNames();
|
void normalize();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void parseSection();
|
void parseSection();
|
||||||
|
@ -67,6 +67,8 @@ class Domain
|
||||||
|
|
||||||
void parseActionSection();
|
void parseActionSection();
|
||||||
|
|
||||||
|
void normalizeParameterNames();
|
||||||
|
|
||||||
Context &m_context;
|
Context &m_context;
|
||||||
|
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
|
|
@ -204,9 +204,9 @@ void Description::checkConsistency()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Description::normalizeParameterNames()
|
void Description::normalize()
|
||||||
{
|
{
|
||||||
m_domain->normalizeParameterNames();
|
m_domain->normalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -415,6 +415,13 @@ void Domain::checkConsistency()
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
void Domain::normalize()
|
||||||
|
{
|
||||||
|
normalizeParameterNames();
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
void Domain::normalizeParameterNames()
|
void Domain::normalizeParameterNames()
|
||||||
{
|
{
|
||||||
std::for_each(m_predicates.begin(), m_predicates.end(),
|
std::for_each(m_predicates.begin(), m_predicates.end(),
|
||||||
|
|
|
@ -23,7 +23,7 @@ TranslatorASP::TranslatorASP(Description &description, utils::LogStream &outputS
|
||||||
: m_description(description),
|
: m_description(description),
|
||||||
m_outputStream(outputStream)
|
m_outputStream(outputStream)
|
||||||
{
|
{
|
||||||
m_description.normalizeParameterNames();
|
m_description.normalize();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Reference in New Issue