Consistently printing operators and Booleans.
This commit is contained in:
parent
098f2bf813
commit
47d7058f5a
@ -238,7 +238,7 @@ struct HeadLiteralPrintSubstitutedVisitor
|
|||||||
throwErrorAtLocation(headLiteral.location, "conditional head literals currently unsupported", context);
|
throwErrorAtLocation(headLiteral.location, "conditional head literals currently unsupported", context);
|
||||||
|
|
||||||
if (i != disjunction.elements.cbegin())
|
if (i != disjunction.elements.cbegin())
|
||||||
context.logger.outputStream() << " " << output::Keyword("or") << " ";
|
context.logger.outputStream() << " " << Clingo::AST::BinaryOperator::Or << " ";
|
||||||
|
|
||||||
visit(conditionLiteral.literal, headLiteral, context);
|
visit(conditionLiteral.literal, headLiteral, context);
|
||||||
}
|
}
|
||||||
|
@ -54,7 +54,7 @@ struct StatementVisitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (rule.body.empty() && context.headTerms.empty())
|
if (rule.body.empty() && context.headTerms.empty())
|
||||||
outputStream << output::Boolean("true");
|
outputStream << Clingo::AST::Boolean({true});
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Print translated body literals
|
// Print translated body literals
|
||||||
@ -63,7 +63,7 @@ struct StatementVisitor
|
|||||||
const auto &bodyLiteral = *i;
|
const auto &bodyLiteral = *i;
|
||||||
|
|
||||||
if (!context.headTerms.empty())
|
if (!context.headTerms.empty())
|
||||||
std::cout << " and ";
|
outputStream << " " << Clingo::AST::BinaryOperator::And << " ";
|
||||||
|
|
||||||
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
||||||
throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);
|
throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);
|
||||||
|
Loading…
Reference in New Issue
Block a user