From 6415f871d7661bf747747ff2fe1821207052530c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Fri, 27 Oct 2017 16:27:33 +0200 Subject: [PATCH] Error for derived predicates in initial state. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, derived predicates in the initial state weren’t handled at all. That’s not an issue, because derived predicates shouldn’t occur in the initial state. However, as a defensive measure, this commit adds an error thrown in such cases. --- src/plasp/pddl/TranslatorASP.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plasp/pddl/TranslatorASP.cpp b/src/plasp/pddl/TranslatorASP.cpp index c0837ac..4a0e79f 100644 --- a/src/plasp/pddl/TranslatorASP.cpp +++ b/src/plasp/pddl/TranslatorASP.cpp @@ -456,8 +456,7 @@ void TranslatorASP::translateInitialState() const const auto handleDerivedPredicate = [&](const ::pddl::normalizedAST::DerivedPredicatePointer &, bool = true) { - // TODO: implement - //translatePredicateToVariable(m_outputStream, *predicate, true); + throw TranslatorException("derived predicates should not occur in initial state"); }; const auto handleNegatedDerivedPredicate =