From 1516561a5895c704f37fbcc99d8e821e8018f520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 27 Jun 2017 12:39:51 +0200 Subject: [PATCH] =?UTF-8?q?Allowing=20=E2=80=9Cnot=E2=80=9D=20expressions?= =?UTF-8?q?=20without=20introducing=20derived=20predicates.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/normalization/Precondition.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp b/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp index 5e4d406..db807c1 100644 --- a/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp +++ b/lib/pddlparse/src/pddlparse/detail/normalization/Precondition.cpp @@ -134,17 +134,6 @@ 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; - - collectFreeVariables(not_, parameters, variableStack); - - auto derivedPredicate = addDerivedPredicate(parameters, derivedPredicates); - auto normalizedArgumentLiteral = not_->argument.match( [&](auto &x) -> normalizedAST::Literal { @@ -157,10 +146,7 @@ normalizedAST::Literal normalizeNested(ast::NotPointer ¬_, auto &normalizedArgument = normalizedArgumentLiteral.get(); - derivedPredicate->declaration->precondition = std::make_unique>(std::move(normalizedArgument)); - - // TODO: investigate, could be a compiler bug - return std::move(derivedPredicate); + return std::make_unique>(std::move(normalizedArgument)); } ////////////////////////////////////////////////////////////////////////////////////////////////////