Fixed issue with unsupported expression negations.

This commit is contained in:
2016-08-16 18:58:30 +02:00
parent 69a26cb22f
commit 91019f52aa
4 changed files with 59 additions and 4 deletions

View File

@@ -412,7 +412,7 @@ void TranslatorASP::translateLiteral(const Expression &literal) const
{
const auto &notExpression = dynamic_cast<const expressions::Not &>(literal);
if (notExpression.expressionType() != Expression::Type::Predicate)
if (notExpression.argument()->expressionType() != Expression::Type::Predicate)
throw utils::TranslatorException("only negations of primitive predicates supported as literals currently");
const auto &predicate = dynamic_cast<const expressions::Predicate &>(*notExpression.argument());