CBMC
smt_solver_process.h
Go to the documentation of this file.
1 // Author: Diffblue Ltd.
2 
3 #ifndef CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_SOLVER_PROCESS_H
4 #define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_SOLVER_PROCESS_H
5 
6 class smt_commandt;
7 
9 #include <util/message.h>
10 #include <util/piped_process.h>
11 
12 #include <sstream>
13 #include <string>
14 
16 {
17 public:
18  virtual const std::string &description() = 0;
19 
22  virtual void send(const smt_commandt &command) = 0;
23 
24  virtual smt_responset
25  receive_response(const std::unordered_map<irep_idt, smt_identifier_termt>
26  &identifier_table) = 0;
27 
28  virtual ~smt_base_solver_processt() = default;
29 };
30 
32 {
33 public:
39  std::string command_line,
40  message_handlert &message_handler);
41 
42  const std::string &description() override;
43 
44  void send(const smt_commandt &smt_command) override;
45 
47  const std::unordered_map<irep_idt, smt_identifier_termt> &identifier_table)
48  override;
49 
50  ~smt_piped_solver_processt() override = default;
51 
52 protected:
58  std::stringstream response_stream;
61 };
62 
63 #endif // CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT_SOLVER_PROCESS_H
messaget
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:154
smt_piped_solver_processt::process
piped_processt process
The raw solver sub process.
Definition: smt_solver_process.h:56
smt_base_solver_processt::~smt_base_solver_processt
virtual ~smt_base_solver_processt()=default
smt_base_solver_processt::description
virtual const std::string & description()=0
smt_base_solver_processt
Definition: smt_solver_process.h:15
smt_responses.h
smt_piped_solver_processt::~smt_piped_solver_processt
~smt_piped_solver_processt() override=default
smt_piped_solver_processt::log
messaget log
For debug printing.
Definition: smt_solver_process.h:60
smt_piped_solver_processt::response_stream
std::stringstream response_stream
For buffering / combining communications from the solver to cbmc.
Definition: smt_solver_process.h:58
smt_piped_solver_processt::send
void send(const smt_commandt &smt_command) override
Converts given SMT2 command to SMT2 string and sends it to the solver process.
Definition: smt_solver_process.cpp:26
smt_responset
Definition: smt_responses.h:9
piped_process.h
smt_piped_solver_processt
Definition: smt_solver_process.h:31
message_handlert
Definition: message.h:27
smt_commandt
Definition: smt_commands.h:13
smt_piped_solver_processt::command_line_description
std::string command_line_description
The command line used to start the process.
Definition: smt_solver_process.h:54
piped_processt
Definition: piped_process.h:27
smt_piped_solver_processt::smt_piped_solver_processt
smt_piped_solver_processt(std::string command_line, message_handlert &message_handler)
Definition: smt_solver_process.cpp:12
smt_piped_solver_processt::receive_response
smt_responset receive_response(const std::unordered_map< irep_idt, smt_identifier_termt > &identifier_table) override
Definition: smt_solver_process.cpp:56
smt_base_solver_processt::send
virtual void send(const smt_commandt &command)=0
Converts given SMT2 command to SMT2 string and sends it to the solver process.
smt_piped_solver_processt::description
const std::string & description() override
Definition: smt_solver_process.cpp:21
smt_base_solver_processt::receive_response
virtual smt_responset receive_response(const std::unordered_map< irep_idt, smt_identifier_termt > &identifier_table)=0
message.h