Renaming to not confuse expression simplification and reduction.
This commit is contained in:
@@ -26,12 +26,12 @@ namespace pddl
|
||||
|
||||
ExpressionPointer Expression::normalized()
|
||||
{
|
||||
return simplified()->negationNormalized();
|
||||
return reduced()->negationNormalized();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ExpressionPointer Expression::simplified()
|
||||
ExpressionPointer Expression::reduced()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user