Renaming to not confuse expression simplification and reduction.

This commit is contained in:
2016-09-05 00:06:09 +02:00
parent dd621fcd5c
commit 79d449d0df
11 changed files with 22 additions and 22 deletions

View File

@@ -26,12 +26,12 @@ namespace pddl
ExpressionPointer Expression::normalized()
{
return simplified()->negationNormalized();
return reduced()->negationNormalized();
}
////////////////////////////////////////////////////////////////////////////////////////////////////
ExpressionPointer Expression::simplified()
ExpressionPointer Expression::reduced()
{
return this;
}

View File

@@ -36,9 +36,9 @@ ExpressionPointer At::argument() const
////////////////////////////////////////////////////////////////////////////////////////////////////
ExpressionPointer At::simplified()
ExpressionPointer At::reduced()
{
throw utils::TranslatorException("“at” predicates currently not supported");
throw utils::TranslatorException("reducing “at” predicates currently not supported");
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -21,13 +21,13 @@ const std::string Imply::Identifier = "imply";
////////////////////////////////////////////////////////////////////////////////////////////////////
ExpressionPointer Imply::simplified()
ExpressionPointer Imply::reduced()
{
BOOST_ASSERT(m_arguments[0]);
BOOST_ASSERT(m_arguments[1]);
m_arguments[0] = m_arguments[0]->simplified();
m_arguments[1] = m_arguments[1]->simplified();
m_arguments[0] = m_arguments[0]->reduced();
m_arguments[1] = m_arguments[1]->reduced();
auto notArgument0 = NotPointer(new Not);
notArgument0->setArgument(m_arguments[0]);
@@ -36,7 +36,7 @@ ExpressionPointer Imply::simplified()
orExpression->addArgument(notArgument0);
orExpression->addArgument(m_arguments[1]);
return orExpression->simplified();
return orExpression;
}
////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@@ -37,11 +37,11 @@ ExpressionPointer Not::argument() const
////////////////////////////////////////////////////////////////////////////////////////////////////
ExpressionPointer Not::simplified()
ExpressionPointer Not::reduced()
{
BOOST_ASSERT(m_argument);
m_argument = m_argument->simplified();
m_argument = m_argument->reduced();
return this;
}