Go to the documentation of this file.
6 #ifndef CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT2_INCREMENTAL_DECISION_PROCEDURE_H
7 #define CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT2_INCREMENTAL_DECISION_PROCEDURE_H
19 #include <unordered_map>
20 #include <unordered_set>
48 void set_to(
const exprt &expr,
bool value)
override;
51 void push(
const std::vector<exprt> &assumptions)
override;
71 template <
typename t_exprt>
129 std::unordered_map<exprt, smt_identifier_termt, irep_hash>
139 std::unordered_map<exprt, smt_identifier_termt, irep_hash>
166 #endif // CPROVER_SOLVERS_SMT2_INCREMENTAL_SMT2_INCREMENTAL_DECISION_PROCEDURE_H
Class that provides messages with a built-in verbosity 'level'.
Specifics of how the object size lookup is implemented in SMT terms.
void define_dependent_functions(const exprt &expr)
Defines any functions which expr depends on, which have not yet been defined, along with their depend...
std::unordered_map< irep_idt, smt_identifier_termt > identifier_table
This maps from the unsorted/untyped string/symbol for the identifiers which we have declared in SMT s...
void define_index_identifiers(const exprt &expr)
Stores identifiers in unescaped and unquoted form.
class smt2_incremental_decision_proceduret::sequencet index_sequence
The type of an expression, extends irept.
void push() override
Push a new context on the stack This context becomes a child context nested in the current context.
std::string decision_procedure_text() const override
Return a textual description of the decision procedure.
Base class for all expressions.
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.
smt_object_mapt object_map
This map is used to track object related state.
void print_assignment(std::ostream &out) const override
Print satisfying assignment to out.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
exprt get_expr(const smt_termt &descriptor, const typet &type) const
Gets the value of descriptor from the solver and returns the solver response expressed as an exprt of...
class smt2_incremental_decision_proceduret::sequencet handle_sequence
type_size_mapt pointer_sizes_map
Precalculated type sizes used for pointer arithmetic.
Array constructor from single element.
size_t number_of_solver_calls
The number of times dec_solve() has been called.
exprt get(const exprt &expr) const override
Return expr with variables replaced by values from satisfying assignment if available.
Generators of sequences of uniquely identifying numbers used for naming SMT functions introduced by t...
resultt
Result of running the decision procedure.
smt_object_sizet object_size_function
Implementation of the SMT formula for the object size function.
void ensure_handle_for_expr_defined(const exprt &expr)
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...
smt2_incremental_decision_proceduret(const namespacet &_ns, std::unique_ptr< smt_base_solver_processt > solver_process, message_handlert &message_handler)
messaget log
For reporting errors, warnings and debugging information back to the user.
void pop() override
Pop whatever is on top of the stack.
const namespacet & ns
Namespace for looking up the expressions which symbol_exprts relate to.
std::unordered_map< exprt, decision_procedure_objectt, irep_hash > smt_object_mapt
Mapping from an object's base expression to the set of information about it which we track.
void define_array_function(const t_exprt &array)
Defines a function of array sort and asserts the element values from array_exprt or array_of_exprt.
void define_object_sizes()
Sends the solver the definitions of the object sizes.
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'.
smt_termt convert_expr_to_smt(const exprt &expr)
Add objects in expr to object_map if needed and convert to smt.
class smt2_incremental_decision_proceduret::sequencet array_sequence
std::unique_ptr< smt_base_solver_processt > solver_process
For handling the lifetime of and communication with the separate SMT solver process.
std::unordered_map< exprt, smt_identifier_termt, irep_hash > expression_handle_identifiers
When the handle(exprt) member function is called, the decision procedure commands the SMT solver to d...
std::unordered_map< typet, smt_termt, irep_full_hash > type_size_mapt
std::unordered_map< exprt, smt_identifier_termt, irep_hash > expression_identifiers
As part of the decision procedure's overall translation of CBMCs exprts into SMT terms,...
Array constructor from list of elements.
std::vector< bool > object_size_defined
The size of each object is separately defined as a pre-solving step.
void initialize_array_elements(const array_exprt &array, const smt_identifier_termt &array_identifier)
Generate and send to the SMT solver clauses asserting that each array element is as specified by arra...