From 47d7058f5ae97d82444e0289a4a9bedb46ec5c96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Thu, 24 Nov 2016 03:20:22 +0100 Subject: [PATCH] Consistently printing operators and Booleans. --- include/anthem/Head.h | 2 +- include/anthem/StatementVisitor.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/anthem/Head.h b/include/anthem/Head.h index e16a570..b06b478 100644 --- a/include/anthem/Head.h +++ b/include/anthem/Head.h @@ -238,7 +238,7 @@ struct HeadLiteralPrintSubstitutedVisitor throwErrorAtLocation(headLiteral.location, "conditional head literals currently unsupported", context); if (i != disjunction.elements.cbegin()) - context.logger.outputStream() << " " << output::Keyword("or") << " "; + context.logger.outputStream() << " " << Clingo::AST::BinaryOperator::Or << " "; visit(conditionLiteral.literal, headLiteral, context); } diff --git a/include/anthem/StatementVisitor.h b/include/anthem/StatementVisitor.h index e1fbbb4..f198cc4 100644 --- a/include/anthem/StatementVisitor.h +++ b/include/anthem/StatementVisitor.h @@ -54,7 +54,7 @@ struct StatementVisitor } if (rule.body.empty() && context.headTerms.empty()) - outputStream << output::Boolean("true"); + outputStream << Clingo::AST::Boolean({true}); else { // Print translated body literals @@ -63,7 +63,7 @@ struct StatementVisitor const auto &bodyLiteral = *i; if (!context.headTerms.empty()) - std::cout << " and "; + outputStream << " " << Clingo::AST::BinaryOperator::And << " "; if (bodyLiteral.sign != Clingo::AST::Sign::None) throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);