From 69a26cb22f5a79441146e4809e89f6333258057c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Tue, 16 Aug 2016 18:43:37 +0200 Subject: [PATCH] Fixed undetected issue with unsupported negations. --- src/plasp/pddl/TranslatorASP.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plasp/pddl/TranslatorASP.cpp b/src/plasp/pddl/TranslatorASP.cpp index 9120370..f84c2ac 100644 --- a/src/plasp/pddl/TranslatorASP.cpp +++ b/src/plasp/pddl/TranslatorASP.cpp @@ -411,6 +411,10 @@ void TranslatorASP::translateLiteral(const Expression &literal) const else if (literal.expressionType() == Expression::Type::Not) { const auto ¬Expression = dynamic_cast(literal); + + if (notExpression.expressionType() != Expression::Type::Predicate) + throw utils::TranslatorException("only negations of primitive predicates supported as literals currently"); + const auto &predicate = dynamic_cast(*notExpression.argument()); m_outputStream << utils::Keyword("variable") << "(";