CBMC
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
smt2_dect Class Reference

Decision procedure interface for various SMT 2.x solvers. More...

#include <smt2_dec.h>

+ Inheritance diagram for smt2_dect:
+ Collaboration diagram for smt2_dect:

Public Member Functions

 
  Return a textual description of the decision procedure.
 
- Public Member Functions inherited from smt2_convt
  smt2_convt (const namespacet &_ns, const std::string &_benchmark, const std::string &_notes, const std::string &_logic, solvert _solver, std::ostream &_out)
 
 
  Generate a handle, which is an expression that has the same value as the argument in any model that is generated; this offers an efficient way to refer to the expression in subsequent calls to get or set_to.
 
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'.
 
  Return expr with variables replaced by values from satisfying assignment if available.
 
void  print_assignment (std::ostream &out) const override
  Print satisfying assignment to out.
 
  Unimplemented.
 
void  push (const std::vector< exprt > &_assumptions) override
  Currently, only implements a single stack element (no nested contexts)
 
  Currently, only implements a single stack element (no nested contexts)
 
  Return the number of incremental solver calls.
 
void  set_converter (irep_idt id, std::function< void(const exprt &)> converter)
 
- Public Member Functions inherited from stack_decision_proceduret
 
- Public Member Functions inherited from decision_proceduret
  For a Boolean expression expr, add the constraint 'expr'.
 
  For a Boolean expression expr, add the constraint 'not expr'.
 
  Run the decision procedure to solve the problem This corresponds to SMT-LIB's check-sat.
 
resultt  operator() (const exprt &assumption)
  Run the decision procedure to solve the problem under the given assumption.
 
 

Protected Member Functions

  Implementation of the decision procedure.
 
resultt  read_result (std::istream &in)
 
- Protected Member Functions inherited from smt2_convt
 
  Writes the end of the SMT file to the smt_convt::out stream.
 
 
  produce a flat bit-vector for a given array of fixed size
 
 
 
 
 
 
 
 
 
 
 
 
  Converting a constant or symbolic rounding mode to SMT-LIB.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
void  convert_string_literal (const std::string &)
 
 
 
  Perform steps necessary before an expression is passed to convert_expr.
 
  Lower byte_update and byte_extract operations within expr.
 
  Find and declare symbols used in an expression This function traverses the expression tree and creates SMT2 declarations for all symbols (variables) found.
 
 
 
 
 
 
  This function is for parsing array output from SMT solvers when "(get-value |???|)" returns an array object.
 
 
void  walk_array_tree (std::unordered_map< int64_t, exprt > *operands_map, const irept &src, const array_typet &type)
  This function walks the SMT output and populates a map with index/value pairs for the array.
 
 
std::string  type2id (const typet &) const
 
std::string  floatbv_suffix (const exprt &) const
 
 
 
 
 
 
  smt2_convt (const namespacet &_ns, const std::string &_benchmark, const std::string &_notes, const std::string &_logic, solvert _solver, std::ostream &_out)
 
 
  Generate a handle, which is an expression that has the same value as the argument in any model that is generated; this offers an efficient way to refer to the expression in subsequent calls to get or set_to.
 
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'.
 
  Return expr with variables replaced by values from satisfying assignment if available.
 
void  print_assignment (std::ostream &out) const override
  Print satisfying assignment to out.
 
  Unimplemented.
 
void  push (const std::vector< exprt > &_assumptions) override
  Currently, only implements a single stack element (no nested contexts)
 
  Currently, only implements a single stack element (no nested contexts)
 
  Return the number of incremental solver calls.
 
void  set_converter (irep_idt id, std::function< void(const exprt &)> converter)
 
- Protected Member Functions inherited from stack_decision_proceduret
 
  For a Boolean expression expr, add the constraint 'expr'.
 
  For a Boolean expression expr, add the constraint 'not expr'.
 
  Run the decision procedure to solve the problem This corresponds to SMT-LIB's check-sat.
 
resultt  operator() (const exprt &assumption)
  Run the decision procedure to solve the problem under the given assumption.
 
 

Protected Attributes

std::string  solver_binary_or_empty
 
 
std::stringstream  cached_output
  Everything except the footer is cached, so that output files can be rewritten with varying footers.
 
- Protected Attributes inherited from smt2_stringstreamt
std::stringstream  stringstream
 
- Protected Attributes inherited from smt2_convt
 
std::ostream &  out
 
std::string  benchmark
 
std::string  notes
 
std::string  logic
 
 
 
std::vector< literaltassumptions
 
 
std::size_t  number_of_solver_calls = 0
 
 
std::unordered_map< irep_idt, ireptcurrent_bindings
 
std::set< irep_idtbvfp_set
 
 
 
 
 
 
std::unordered_map< irep_idt, boolset_values
  The values which boolean identifiers have been smt2_convt::set_to or in other words those which are asserted as true / false in the output smt2 formula.
 
 
 
std::size_t  no_boolean_variables
 
std::vector< boolboolean_assignment
 
 
 
 
 
 
 
 

Additional Inherited Members

- Public Types inherited from smt2_convt
enum class   solvert {
  GENERIC , BITWUZLA , BOOLECTOR , CPROVER_SMT2 ,
  CVC5 , MATHSAT , YICES , Z3
}
 
- Public Types inherited from decision_proceduret
  Result of running the decision procedure. More...
 
- Static Public Member Functions inherited from smt2_convt
static std::string  convert_identifier (const irep_idt &identifier)
 
- Public Attributes inherited from smt2_convt
 
 
 
 
 
 
 
- Protected Types inherited from smt2_convt
enum class   wheret { BEGIN , END }
 
using  converterst = std::unordered_map< irep_idt, std::function< void(const exprt &)>, irep_id_hash >
 
typedef std::unordered_map< irep_idt, identifiertidentifier_mapt
 
typedef std::map< typet, std::string >  datatype_mapt
 
 
typedef std::set< std::string >  smt2_identifierst
 
enum class   solvert {
  GENERIC , BITWUZLA , BOOLECTOR , CPROVER_SMT2 ,
  CVC5 , MATHSAT , YICES , Z3
}
 
- Protected Types inherited from decision_proceduret
  Result of running the decision procedure. More...
 
- Static Protected Member Functions inherited from smt2_convt
static std::string  convert_identifier (const irep_idt &identifier)
 

Detailed Description

Decision procedure interface for various SMT 2.x solvers.

Definition at line 25 of file smt2_dec.h.

Constructor & Destructor Documentation

◆  smt2_dect()

smt2_dect::smt2_dect ( const namespacet_ns,
const std::string &  _benchmark,
const std::string &  _notes,
const std::string &  _logic,
solvert  _solver,
const std::string &  _solver_binary_or_empty,
message_handlert_message_handler 
)
inline

Definition at line 28 of file smt2_dec.h.

Member Function Documentation

◆  dec_solve()

decision_proceduret::resultt smt2_dect::dec_solve ( const exprtassumption )
overrideprotectedvirtual

Implementation of the decision procedure.

Reimplemented from smt2_convt.

Definition at line 36 of file smt2_dec.cpp.

◆  decision_procedure_text()

std::string smt2_dect::decision_procedure_text ( ) const
overridevirtual

Return a textual description of the decision procedure.

Reimplemented from smt2_convt.

Definition at line 20 of file smt2_dec.cpp.

◆  read_result()

decision_proceduret::resultt smt2_dect::read_result ( std::istream &  in )
protected

Definition at line 157 of file smt2_dec.cpp.

Member Data Documentation

◆  cached_output

std::stringstream smt2_dect::cached_output
protected

Everything except the footer is cached, so that output files can be rewritten with varying footers.

Definition at line 51 of file smt2_dec.h.

◆  message_handler

message_handlert& smt2_dect::message_handler
protected

Definition at line 46 of file smt2_dec.h.

◆  solver_binary_or_empty

std::string smt2_dect::solver_binary_or_empty
protected

Definition at line 45 of file smt2_dec.h.


The documentation for this class was generated from the following files:
  • /home/runner/work/cbmc/cbmc/src/solvers/smt2/smt2_dec.h
  • /home/runner/work/cbmc/cbmc/src/solvers/smt2/smt2_dec.cpp

AltStyle によって変換されたページ (->オリジナル) /