CBMC
smt2_dec.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_SOLVERS_SMT2_SMT2_DEC_H
11 #define CPROVER_SOLVERS_SMT2_SMT2_DEC_H
12 
13 #include "smt2_conv.h"
14 
15 #include <fstream>
16 
17 class message_handlert;
18 
20 {
21 protected:
22  std::stringstream stringstream;
23 };
24 
27 class smt2_dect : protected smt2_stringstreamt, public smt2_convt
28 {
29 public:
31  const namespacet &_ns,
32  const std::string &_benchmark,
33  const std::string &_notes,
34  const std::string &_logic,
35  solvert _solver,
36  message_handlert &_message_handler)
37  : smt2_convt(_ns, _benchmark, _notes, _logic, _solver, stringstream),
38  message_handler(_message_handler)
39  {
40  }
41 
42  std::string decision_procedure_text() const override;
43 
44 protected:
46  resultt dec_solve(const exprt &) override;
47 
50  std::stringstream cached_output;
51 
52  resultt read_result(std::istream &in);
53 };
54 
55 #endif // CPROVER_SOLVERS_SMT2_SMT2_DEC_H
resultt
Result of running the decision procedure.
Base class for all expressions.
Definition: expr.h:56
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:94
Decision procedure interface for various SMT 2.x solvers.
Definition: smt2_dec.h:28
smt2_dect(const namespacet &_ns, const std::string &_benchmark, const std::string &_notes, const std::string &_logic, solvert _solver, message_handlert &_message_handler)
Definition: smt2_dec.h:30
message_handlert & message_handler
Definition: smt2_dec.h:45
std::string decision_procedure_text() const override
Return a textual description of the decision procedure.
Definition: smt2_dec.cpp:18
resultt dec_solve(const exprt &) override
Implementation of the decision procedure.
Definition: smt2_dec.cpp:36
resultt read_result(std::istream &in)
Definition: smt2_dec.cpp:160
std::stringstream cached_output
Everything except the footer is cached, so that output files can be rewritten with varying footers.
Definition: smt2_dec.h:50
std::stringstream stringstream
Definition: smt2_dec.h:22