From ef1a133c2ddddffb580d8841da0c225b42b37d5e Mon Sep 17 00:00:00 2001 From: sp Date: Wed, 10 Jan 2024 19:15:37 +0100 Subject: [PATCH] removed printing of unnecessary formulas --- util/PrismFormulaPrinter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util/PrismFormulaPrinter.cpp b/util/PrismFormulaPrinter.cpp index a873b38..1317fe3 100644 --- a/util/PrismFormulaPrinter.cpp +++ b/util/PrismFormulaPrinter.cpp @@ -79,8 +79,8 @@ namespace prism { } else { os << buildFormula(agentName + "IsOnSlippery", "false"); } - printIsOnFormula(agentName, "Lava", lava); - printIsOnFormula(agentName, "Goal", goals); + if(!lava.empty()) printIsOnFormula(agentName, "Lava", lava); + if(!goals.empty()) printIsOnFormula(agentName, "Goal", goals); for(const auto& ball : balls) { std::string identifier = capitalize(ball.getColor()) + ball.getType(); @@ -115,8 +115,6 @@ namespace prism { if(conditionalMovementRestrictions.size() > 0) { os << buildFormula(agentName + "CannotMoveConditionally", vectorToDisjunction(conditionalMovementRestrictions)); os << buildFormula(agentName + "IsCarrying", vectorToDisjunction(portableObjects)); - } else { - os << buildFormula(agentName + "CannotMoveConditionally", "false"); } }