From 3fa7b93d448ac21f17b36a8ae1631b3aa86bdd5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sun, 4 Sep 2016 23:34:20 +0200 Subject: [PATCH] Fixed wrong recursive call. --- include/plasp/pddl/expressions/Binary.h | 2 +- src/plasp/pddl/expressions/Not.cpp | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/plasp/pddl/expressions/Binary.h b/include/plasp/pddl/expressions/Binary.h index 016b390..e7e3af2 100644 --- a/include/plasp/pddl/expressions/Binary.h +++ b/include/plasp/pddl/expressions/Binary.h @@ -112,7 +112,7 @@ inline ExpressionPointer Binary::negationNormalized() { BOOST_ASSERT(m_arguments[i]); - m_arguments[i] = m_arguments[i]->normalized(); + m_arguments[i] = m_arguments[i]->negationNormalized(); } return this; diff --git a/src/plasp/pddl/expressions/Not.cpp b/src/plasp/pddl/expressions/Not.cpp index f71def7..7ca4e57 100644 --- a/src/plasp/pddl/expressions/Not.cpp +++ b/src/plasp/pddl/expressions/Not.cpp @@ -57,18 +57,18 @@ ExpressionPointer Not::negationNormalized() { auto &argument = dynamic_cast(*m_argument); - return argument.m_argument->normalized(); + return argument.m_argument->negationNormalized(); } // Normalize argument - m_argument = m_argument->normalized(); + m_argument = m_argument->negationNormalized(); // Remove double negations occurring after normalizing the argument if (m_argument->expressionType() == Expression::Type::Not) { auto &argument = dynamic_cast(*m_argument); - return argument.m_argument->normalized(); + return argument.m_argument->negationNormalized(); } // De Morgan for negative conjunctions @@ -82,7 +82,7 @@ ExpressionPointer Not::negationNormalized() for (size_t i = 0; i < andExpression.arguments().size(); i++) orExpression->addArgument(andExpression.arguments()[i]->negated()); - return orExpression->normalized(); + return orExpression->negationNormalized(); } // De Morgan for negative disjunctions @@ -96,7 +96,7 @@ ExpressionPointer Not::negationNormalized() for (size_t i = 0; i < orExpression.arguments().size(); i++) andExpression->addArgument(orExpression.arguments()[i]->negated()); - return andExpression->normalized(); + return andExpression->negationNormalized(); } return this;