Implemented simplification of directly nested n-ary expressions of the same type.
This commit is contained in:
@@ -26,7 +26,7 @@ namespace pddl
|
||||
|
||||
ExpressionPointer Expression::normalized()
|
||||
{
|
||||
return reduced()->negationNormalized();
|
||||
return reduced()->negationNormalized()->simplified();
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -45,6 +45,13 @@ ExpressionPointer Expression::negationNormalized()
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ExpressionPointer Expression::simplified()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ExpressionPointer Expression::negated()
|
||||
{
|
||||
if (expressionType() == Type::Not)
|
||||
|
Reference in New Issue
Block a user