Handling negated head literals.
This commit is contained in:
parent
fbe351a85b
commit
bdc560869a
@ -215,6 +215,11 @@ struct HeadLiteralPrintSubstitutedVisitor
|
|||||||
{
|
{
|
||||||
void visit(const Clingo::AST::Literal &literal, const Clingo::AST::HeadLiteral &, const std::vector<const Clingo::AST::Term *> &terms)
|
void visit(const Clingo::AST::Literal &literal, const Clingo::AST::HeadLiteral &, const std::vector<const Clingo::AST::Term *> &terms)
|
||||||
{
|
{
|
||||||
|
if (literal.sign == Clingo::AST::Sign::DoubleNegation)
|
||||||
|
throwErrorAtLocation(literal.location, "double-negated literals currently unsupported");
|
||||||
|
else if (literal.sign == Clingo::AST::Sign::Negation)
|
||||||
|
std::cout << "not ";
|
||||||
|
|
||||||
literal.data.accept(LiteralPrintSubstitutedVisitor(), literal, terms);
|
literal.data.accept(LiteralPrintSubstitutedVisitor(), literal, terms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user