diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2014-10-04 20:33:50 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2014-10-06 11:56:39 -0400 |
commit | 5738d3d2f9e917829156e678cbf317f3a1a37c9a (patch) | |
tree | a1270a0330b80deaeb4c8feec7629c5f748ab367 /src/printer | |
parent | 54b2aac34e418108265dd43a956a7865c50b9cf4 (diff) |
Support for RESET command in CVC native language (and infrastructure for support elsewhere).
Diffstat (limited to 'src/printer')
-rw-r--r-- | src/printer/ast/ast_printer.cpp | 5 | ||||
-rw-r--r-- | src/printer/cvc/cvc_printer.cpp | 5 | ||||
-rw-r--r-- | src/printer/smt2/smt2_printer.cpp | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/src/printer/ast/ast_printer.cpp b/src/printer/ast/ast_printer.cpp index 9b60c8942..220916a1a 100644 --- a/src/printer/ast/ast_printer.cpp +++ b/src/printer/ast/ast_printer.cpp @@ -140,6 +140,7 @@ void AstPrinter::toStream(std::ostream& out, const Command* c, tryToStream<PopCommand>(out, c) || tryToStream<CheckSatCommand>(out, c) || tryToStream<QueryCommand>(out, c) || + tryToStream<ResetCommand>(out, c) || tryToStream<QuitCommand>(out, c) || tryToStream<DeclarationSequence>(out, c) || tryToStream<CommandSequence>(out, c) || @@ -224,6 +225,10 @@ static void toStream(std::ostream& out, const QueryCommand* c) throw() { out << "Query(" << c->getExpr() << ')'; } +static void toStream(std::ostream& out, const ResetCommand* c) throw() { + out << "Reset()"; +} + static void toStream(std::ostream& out, const QuitCommand* c) throw() { out << "Quit()"; } diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index ed5116bc6..2b5cc39c8 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -859,6 +859,7 @@ void CvcPrinter::toStream(std::ostream& out, const Command* c, tryToStream<PopCommand>(out, c, d_cvc3Mode) || tryToStream<CheckSatCommand>(out, c, d_cvc3Mode) || tryToStream<QueryCommand>(out, c, d_cvc3Mode) || + tryToStream<ResetCommand>(out, c, d_cvc3Mode) || tryToStream<QuitCommand>(out, c, d_cvc3Mode) || tryToStream<DeclarationSequence>(out, c, d_cvc3Mode) || tryToStream<CommandSequence>(out, c, d_cvc3Mode) || @@ -1045,6 +1046,10 @@ static void toStream(std::ostream& out, const QueryCommand* c, bool cvc3Mode) th } } +static void toStream(std::ostream& out, const ResetCommand* c, bool cvc3Mode) throw() { + out << "RESET;"; +} + static void toStream(std::ostream& out, const QuitCommand* c, bool cvc3Mode) throw() { //out << "EXIT;"; } diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 3ca5674e9..b415c6b19 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -699,6 +699,7 @@ void Smt2Printer::toStream(std::ostream& out, const Command* c, tryToStream<PopCommand>(out, c) || tryToStream<CheckSatCommand>(out, c) || tryToStream<QueryCommand>(out, c) || + tryToStream<ResetCommand>(out, c) || tryToStream<QuitCommand>(out, c) || tryToStream<DeclarationSequence>(out, c) || tryToStream<CommandSequence>(out, c) || @@ -940,6 +941,10 @@ static void toStream(std::ostream& out, const QueryCommand* c) throw() { } } +static void toStream(std::ostream& out, const ResetCommand* c) throw() { + out << "(reset)"; +} + static void toStream(std::ostream& out, const QuitCommand* c) throw() { out << "(exit)"; } |