From c232c1054d0635f4fcd136c3cb2038fa57538e6b Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 5 Dec 2011 21:11:19 +0000 Subject: [PATCH] change short-circuiting behavior of Command execution in the main driver; allows a (limited) form of error recovery, matching what we had previously --- src/main/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/main.cpp b/src/main/main.cpp index 76ca7a925..df9063808 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -294,7 +294,7 @@ static int runCvc4(int argc, char* argv[]) { replayParser->useDeclarationsFrom(shell.getParser()); } while((cmd = shell.readCommand())) { - status = status && doCommand(smt, cmd); + status = doCommand(smt, cmd) && status; delete cmd; } } else { @@ -310,7 +310,7 @@ static int runCvc4(int argc, char* argv[]) { replayParser->useDeclarationsFrom(parser); } while((cmd = parser->nextCommand())) { - status = status && doCommand(smt, cmd); + status = doCommand(smt, cmd) && status; delete cmd; } // Remove the parser @@ -370,7 +370,7 @@ static bool doCommand(SmtEngine& smt, Command* cmd) { for(CommandSequence::iterator subcmd = seq->begin(); subcmd != seq->end(); ++subcmd) { - status = status && doCommand(smt, *subcmd); + status = doCommand(smt, *subcmd) && status; } } else { if(options.verbosity > 0) { -- 2.30.2