diff options
Diffstat (limited to 'src/printer/smt2/smt2_printer.h')
-rw-r--r-- | src/printer/smt2/smt2_printer.h | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/src/printer/smt2/smt2_printer.h b/src/printer/smt2/smt2_printer.h index 96f55d7a2..922b69a9e 100644 --- a/src/printer/smt2/smt2_printer.h +++ b/src/printer/smt2/smt2_printer.h @@ -36,29 +36,42 @@ enum Variant { };/* enum Variant */ class Smt2Printer : public CVC4::Printer { - Variant d_variant; - - void toStream(std::ostream& out, TNode n, int toDepth, bool types, TypeNode nt) const throw(); - void toStream(std::ostream& out, const Model& m, const Command* c) const throw(); -public: + public: Smt2Printer(Variant variant = no_variant) : d_variant(variant) { } 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 SExpr& sexpr) 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; /** * Writes the unsat core to the stream out. * We use the expression names that are stored in the SMT engine associated * with the core (UnsatCore::getSmtEngine) for printing named assertions. */ - void toStream(std::ostream& out, const UnsatCore& core) const throw(); + void toStream(std::ostream& out, const UnsatCore& core) const override; /** * Write the term that sygus datatype term node n * encodes to a stream with this Printer. */ - virtual void toStreamSygus(std::ostream& out, TNode n) const throw() override; + void toStreamSygus(std::ostream& out, TNode n) const override; + + private: + void toStream( + std::ostream& out, TNode n, int toDepth, bool types, TypeNode nt) const; + void toStream(std::ostream& out, + const Model& m, + const Command* c) const override; + void toStream(std::ostream& out, const SExpr& sexpr) const; + + Variant d_variant; };/* class Smt2Printer */ }/* CVC4::printer::smt2 namespace */ @@ -66,4 +79,3 @@ public: }/* CVC4 namespace */ #endif /* __CVC4__PRINTER__SMT2_PRINTER_H */ - |