cprover
smt2_incremental_decision_procedure.cpp
Go to the documentation of this file.
1 // Author: Diffblue Ltd.
2 
4 
5 #include <util/expr.h>
6 
8  std::string solver_command)
9  : solver_command{std::move(solver_command)}, number_of_solver_calls{0}
10 {
11 }
12 
14 {
15  return expr;
16 }
17 
19 {
20  UNIMPLEMENTED_FEATURE("`get` of:\n " + expr.pretty(2, 0));
21 }
22 
24  std::ostream &out) const
25 {
26  UNIMPLEMENTED_FEATURE("printing of assignments.");
27 }
28 
29 std::string
31 {
32  return "incremental SMT2 solving via \"" + solver_command + "\"";
33 }
34 
35 std::size_t
37 {
39 }
40 
42 {
44  "`set_to` (" + std::string{value ? "true" : "false"} + "):\n " +
45  expr.pretty(2, 0));
46 }
47 
49  const std::vector<exprt> &assumptions)
50 {
51  for(const auto &assumption : assumptions)
52  {
54  "pushing of assumption:\n " + assumption.pretty(2, 0));
55  }
56  UNIMPLEMENTED_FEATURE("`push` of empty assumptions.");
57 }
58 
60 {
61  UNIMPLEMENTED_FEATURE("`push`.");
62 }
63 
65 {
66  UNIMPLEMENTED_FEATURE("`pop`.");
67 }
68 
70 {
72  UNIMPLEMENTED_FEATURE("solving.");
73 }
resultt
Result of running the decision procedure.
Base class for all expressions.
Definition: expr.h:54
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
Definition: irep.cpp:495
exprt handle(const exprt &expr) override
Generate a handle, which is an expression that has the same value as the argument in any model that i...
resultt dec_solve() override
Run the decision procedure to solve the problem.
std::size_t get_number_of_solver_calls() const override
Return the number of incremental solver calls.
std::string decision_procedure_text() const override
Return a textual description of the decision procedure.
void print_assignment(std::ostream &out) const override
Print satisfying assignment to out.
void push() override
Push a new context on the stack This context becomes a child context nested in the current context.
void pop() override
Pop whatever is on top of the stack.
std::string solver_command
This is where we store the solver command for reporting the solver used.
exprt get(const exprt &expr) const override
Return expr with variables replaced by values from satisfying assignment if available.
void set_to(const exprt &expr, bool value) override
For a Boolean expression expr, add the constraint 'expr' if value is true, otherwise add 'not expr'.
Decision procedure with incremental SMT2 solving.
#define UNIMPLEMENTED_FEATURE(FEATURE)
Definition: invariant.h:517