Fixed undetected issue with unsupported negations.
This commit is contained in:
parent
cdb06fa5bf
commit
69a26cb22f
@ -411,6 +411,10 @@ void TranslatorASP::translateLiteral(const Expression &literal) const
|
||||
else if (literal.expressionType() == Expression::Type::Not)
|
||||
{
|
||||
const auto ¬Expression = dynamic_cast<const expressions::Not &>(literal);
|
||||
|
||||
if (notExpression.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());
|
||||
|
||||
m_outputStream << utils::Keyword("variable") << "(";
|
||||
|
Reference in New Issue
Block a user