From 95984f04477eb3ad2ace3cdb53ba049039eb89f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Mon, 5 Jun 2017 04:24:00 +0200 Subject: [PATCH] Added warning when attempting to use #show statements without completion. --- src/anthem/Translation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/anthem/Translation.cpp b/src/anthem/Translation.cpp index a221685..60505e2 100644 --- a/src/anthem/Translation.cpp +++ b/src/anthem/Translation.cpp @@ -64,10 +64,11 @@ void translate(const char *fileName, std::istream &stream, Context &context) ast::PrintContext printContext; - // TODO: respect predicate visibility in output - if (!context.complete) { + if (context.visiblePredicateSignatures) + context.logger.log(output::Priority::Warning) << "#show statements are ignored because completion is not enabled"; + for (const auto &scopedFormula : scopedFormulas) { ast::print(context.logger.outputStream(), scopedFormula.formula, printContext);