change short-circuiting behavior of Command execution in the main driver; allows...
authorMorgan Deters <mdeters@gmail.com>
Mon, 5 Dec 2011 21:11:19 +0000 (21:11 +0000)
committerMorgan Deters <mdeters@gmail.com>
Mon, 5 Dec 2011 21:11:19 +0000 (21:11 +0000)
src/main/main.cpp

index 76ca7a9252fea299cb89ac64588e76091ff3ed94..df906380814f20c77eac440198d09028f01de219 100644 (file)
@@ -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) {