From d5dd8e849f26cd5eb29ffc4ec255dd0ba53df7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Sat, 24 Jun 2017 16:02:48 +0200 Subject: [PATCH] =?UTF-8?q?Avoiding=20to=20decompose=20=E2=80=9Cnot?= =?UTF-8?q?=E2=80=9D=20expressions=20if=20they=20form=20simple=20literals.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pddlparse/detail/normalization/Precondition.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp b/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp index 765c40a..45977b4 100644 --- a/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp +++ b/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp @@ -120,6 +120,10 @@ normalizedAST::Literal normalizeNested(ast::ImplyPointer &, n normalizedAST::Literal normalizeNested(ast::NotPointer ¬_, normalizedAST::DerivedPredicateDeclarations &derivedPredicates) { + // “not” expressions may be nested one time to form simple literals + if (not_->argument.is()) + return std::make_unique>(normalize(std::move(not_->argument.get()))); + std::vector parameters; VariableStack variableStack;