diff options
author | Tim King <taking@cs.nyu.edu> | 2017-11-28 09:07:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-28 09:07:14 -0800 |
commit | 45497438b85dfc408c974a788e28525f0b5717b9 (patch) | |
tree | 75929fcefcb17d5ba58bdffc136ba2ce49b2d622 /src/printer/tptp | |
parent | d552ca179b8723a93c6e0dae61242ceb1ccaa717 (diff) |
Removing throw specifiers from internal Printer hierarchy. (#1393)
Diffstat (limited to 'src/printer/tptp')
-rw-r--r-- | src/printer/tptp/tptp_printer.cpp | 28 | ||||
-rw-r--r-- | src/printer/tptp/tptp_printer.h | 26 |
2 files changed, 38 insertions, 16 deletions
diff --git a/src/printer/tptp/tptp_printer.cpp b/src/printer/tptp/tptp_printer.cpp index 102419ec4..ceee07bf1 100644 --- a/src/printer/tptp/tptp_printer.cpp +++ b/src/printer/tptp/tptp_printer.cpp @@ -33,22 +33,28 @@ namespace CVC4 { namespace printer { namespace tptp { -void TptpPrinter::toStream(std::ostream& out, TNode n, - int toDepth, bool types, size_t dag) const throw() { +void TptpPrinter::toStream( + std::ostream& out, TNode n, int toDepth, bool types, size_t dag) const +{ n.toStream(out, toDepth, types, dag, language::output::LANG_SMTLIB_V2_5); }/* TptpPrinter::toStream() */ -void TptpPrinter::toStream(std::ostream& out, const Command* c, - int toDepth, bool types, size_t dag) const throw() { +void TptpPrinter::toStream(std::ostream& out, + const Command* c, + int toDepth, + bool types, + size_t dag) const +{ c->toStream(out, toDepth, types, dag, language::output::LANG_SMTLIB_V2_5); }/* TptpPrinter::toStream() */ -void TptpPrinter::toStream(std::ostream& out, const CommandStatus* s) const throw() { +void TptpPrinter::toStream(std::ostream& out, const CommandStatus* s) const +{ s->toStream(out, language::output::LANG_SMTLIB_V2_5); }/* TptpPrinter::toStream() */ - -void TptpPrinter::toStream(std::ostream& out, const Model& m) const throw() { +void TptpPrinter::toStream(std::ostream& out, const Model& m) const +{ out << "% SZS output start FiniteModel for " << m.getInputName() << endl; for(size_t i = 0; i < m.getNumCommands(); ++i) { this->Printer::toStreamUsing(language::output::LANG_SMTLIB_V2_5, out, m, m.getCommand(i)); @@ -56,11 +62,15 @@ void TptpPrinter::toStream(std::ostream& out, const Model& m) const throw() { out << "% SZS output end FiniteModel for " << m.getInputName() << endl; } -void TptpPrinter::toStream(std::ostream& out, const Model& m, const Command* c) const throw() { +void TptpPrinter::toStream(std::ostream& out, + const Model& m, + const Command* c) const +{ // shouldn't be called; only the non-Command* version above should be Unreachable(); } -void TptpPrinter::toStream(std::ostream& out, const UnsatCore& core) const throw() { +void TptpPrinter::toStream(std::ostream& out, const UnsatCore& core) const +{ out << "% SZS output start UnsatCore " << std::endl; SmtEngine * smt = core.getSmtEngine(); Assert( smt!=NULL ); diff --git a/src/printer/tptp/tptp_printer.h b/src/printer/tptp/tptp_printer.h index 731885068..7e4cc0f83 100644 --- a/src/printer/tptp/tptp_printer.h +++ b/src/printer/tptp/tptp_printer.h @@ -28,18 +28,30 @@ namespace printer { namespace tptp { class TptpPrinter : public CVC4::Printer { - void toStream(std::ostream& out, const Model& m, const Command* c) const throw(); -public: + public: using CVC4::Printer::toStream; - void toStream(std::ostream& out, TNode n, int toDepth, bool types, size_t dag) const throw(); - void toStream(std::ostream& out, const Command* c, int toDepth, bool types, size_t dag) const throw(); - void toStream(std::ostream& out, const CommandStatus* s) const throw(); - void toStream(std::ostream& out, const Model& m) const throw(); + void toStream(std::ostream& out, + TNode n, + int toDepth, + bool types, + size_t dag) const override; + void toStream(std::ostream& out, + const Command* c, + int toDepth, + bool types, + size_t dag) const override; + void toStream(std::ostream& out, const CommandStatus* s) const override; + void toStream(std::ostream& out, const Model& m) const override; /** print unsat core to stream * We use the expression names stored in the SMT engine associated with the unsat core * with UnsatCore::getSmtEngine. */ - void toStream(std::ostream& out, const UnsatCore& core) const throw(); + void toStream(std::ostream& out, const UnsatCore& core) const override; + + private: + void toStream(std::ostream& out, + const Model& m, + const Command* c) const override; };/* class TptpPrinter */ }/* CVC4::printer::tptp namespace */ |