diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-03-21 14:30:32 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-03-21 16:25:13 -0400 |
commit | ed40bbae19622ff29e1ca6eb873d20262ed21926 (patch) | |
tree | a3f1954f8311cf96a5a30eadf59786e80b8693c4 /src/expr/command.cpp | |
parent | 332772cb9ec225587d2107881d3b6f119e332b84 (diff) |
Add the ability to "mute" commands, needed for SMT-LIB compliance.
Diffstat (limited to 'src/expr/command.cpp')
-rw-r--r-- | src/expr/command.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/expr/command.cpp b/src/expr/command.cpp index 9edc77e39..43679113c 100644 --- a/src/expr/command.cpp +++ b/src/expr/command.cpp @@ -74,11 +74,12 @@ ostream& operator<<(ostream& out, const CommandStatus* s) throw() { /* class Command */ -Command::Command() throw() : d_commandStatus(NULL) { +Command::Command() throw() : d_commandStatus(NULL), d_muted(false) { } Command::Command(const Command& cmd) { d_commandStatus = (cmd.d_commandStatus == NULL) ? NULL : &cmd.d_commandStatus->clone(); + d_muted = cmd.d_muted; } Command::~Command() throw() { @@ -98,7 +99,9 @@ bool Command::fail() const throw() { void Command::invoke(SmtEngine* smtEngine, std::ostream& out) throw() { invoke(smtEngine); - printResult(out); + if(!(isMuted() && ok())) { + printResult(out); + } } std::string Command::toString() const throw() { |