diff options
author | Liana Hadarean <lianah@cs.nyu.edu> | 2014-11-17 15:26:42 -0500 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2014-11-17 15:26:42 -0500 |
commit | 3ba7ed6b1b09739385ae2ffb77a5c7ccd18b40a5 (patch) | |
tree | 845ae47600ffff9c68fa654c0f78d3474e406beb /src/printer | |
parent | d8da3b13bc9df7750723cf3da38edc8cb6f67d3d (diff) |
Resource-limiting work.
Signed-off-by: Morgan Deters <mdeters@cs.nyu.edu>
Diffstat (limited to 'src/printer')
-rw-r--r-- | src/printer/ast/ast_printer.cpp | 7 | ||||
-rw-r--r-- | src/printer/cvc/cvc_printer.cpp | 7 | ||||
-rw-r--r-- | src/printer/smt2/smt2_printer.cpp | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/printer/ast/ast_printer.cpp b/src/printer/ast/ast_printer.cpp index 94ca46257..c24ed8372 100644 --- a/src/printer/ast/ast_printer.cpp +++ b/src/printer/ast/ast_printer.cpp @@ -179,7 +179,8 @@ void AstPrinter::toStream(std::ostream& out, const CommandStatus* s) const throw if(tryToStream<CommandSuccess>(out, s) || tryToStream<CommandFailure>(out, s) || - tryToStream<CommandUnsupported>(out, s)) { + tryToStream<CommandUnsupported>(out, s) || + tryToStream<CommandInterrupted>(out, s)) { return; } @@ -373,6 +374,10 @@ static void toStream(std::ostream& out, const CommandSuccess* s) throw() { } } +static void toStream(std::ostream& out, const CommandInterrupted* s) throw() { + out << "INTERRUPTED" << endl; +} + static void toStream(std::ostream& out, const CommandUnsupported* s) throw() { out << "UNSUPPORTED" << endl; } diff --git a/src/printer/cvc/cvc_printer.cpp b/src/printer/cvc/cvc_printer.cpp index f8df9d906..2e1170666 100644 --- a/src/printer/cvc/cvc_printer.cpp +++ b/src/printer/cvc/cvc_printer.cpp @@ -905,7 +905,8 @@ void CvcPrinter::toStream(std::ostream& out, const CommandStatus* s) const throw if(tryToStream<CommandSuccess>(out, s, d_cvc3Mode) || tryToStream<CommandFailure>(out, s, d_cvc3Mode) || - tryToStream<CommandUnsupported>(out, s, d_cvc3Mode)) { + tryToStream<CommandUnsupported>(out, s, d_cvc3Mode) || + tryToStream<CommandInterrupted>(out, s, d_cvc3Mode)) { return; } @@ -1267,6 +1268,10 @@ static void toStream(std::ostream& out, const CommandUnsupported* s, bool cvc3Mo out << "UNSUPPORTED" << endl; } +static void toStream(std::ostream& out, const CommandInterrupted* s, bool cvc3Mode) throw() { + out << "INTERRUPTED" << endl; +} + static void toStream(std::ostream& out, const CommandFailure* s, bool cvc3Mode) throw() { out << s->getMessage() << endl; } diff --git a/src/printer/smt2/smt2_printer.cpp b/src/printer/smt2/smt2_printer.cpp index 88bcce5ae..4f12ed012 100644 --- a/src/printer/smt2/smt2_printer.cpp +++ b/src/printer/smt2/smt2_printer.cpp @@ -794,7 +794,8 @@ void Smt2Printer::toStream(std::ostream& out, const CommandStatus* s) const thro if(tryToStream<CommandSuccess>(out, s, d_variant) || tryToStream<CommandFailure>(out, s, d_variant) || - tryToStream<CommandUnsupported>(out, s, d_variant)) { + tryToStream<CommandUnsupported>(out, s, d_variant) || + tryToStream<CommandInterrupted>(out, s, d_variant)) { return; } @@ -1208,6 +1209,10 @@ static void toStream(std::ostream& out, const CommandSuccess* s, Variant v) thro } } +static void toStream(std::ostream& out, const CommandInterrupted* s, Variant v) throw() { + out << "interrupted" << endl; +} + static void toStream(std::ostream& out, const CommandUnsupported* s, Variant v) throw() { #ifdef CVC4_COMPETITION_MODE // if in competition mode, lie and say we're ok |