Fixed "success" response to (push N) / (pop N) with N > 1.
authorMorgan Deters <mdeters@cs.nyu.edu>
Fri, 17 May 2013 12:51:36 +0000 (08:51 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Fri, 17 May 2013 12:51:36 +0000 (08:51 -0400)
Thanks to David Cok for reporting this issue.

src/parser/smt2/Smt2.g

index 8dcde24832b460145ab5bf798945adc8777cfd01..76708807fdb2fa39e7c522c5ca72c6e6c12d8666 100644 (file)
@@ -314,7 +314,9 @@ command returns [CVC4::Command* cmd = NULL]
           CommandSequence* seq = new CommandSequence();
           do {
             PARSER_STATE->pushScope();
-            seq->addCommand(new PushCommand());
+            Command* c = new PushCommand();
+            c->setMuted(n > 1);
+            seq->addCommand(c);
           } while(--n > 0);
           cmd = seq;
         }
@@ -337,7 +339,9 @@ command returns [CVC4::Command* cmd = NULL]
           CommandSequence* seq = new CommandSequence();
           do {
             PARSER_STATE->popScope();
-            seq->addCommand(new PopCommand());
+            Command* c = new PopCommand();
+            c->setMuted(n > 1);
+            seq->addCommand(c);
           } while(--n > 0);
           cmd = seq;
         }