CBMC
Loading...
Searching...
No Matches
Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
bv_pointers_widet Class Reference

#include <bv_pointers_wide.h>

+ Inheritance diagram for bv_pointers_widet:
+ Collaboration diagram for bv_pointers_widet:

Classes

struct   postponedt
 

Public Member Functions

 
 
std::size_t  boolbv_width (const typet &type) const override
 
 
- Public Member Functions inherited from boolbvt
 
virtual const bvtconvert_bv (const exprt &expr, const std::optional< std::size_t > expected_width={})
  Convert expression to vector of literalts, using an internal cache to speed up conversion if available.
 
  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'.
 
void  print_assignment (std::ostream &out) const override
  Print satisfying assignment to 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.
 
 
 
mp_integer  get_value (const bvt &bv, std::size_t offset, std::size_t width)
 
 
 
- Public Member Functions inherited from arrayst
 
 
 
  Record that symbol is equal to value for the purposes of the array theory.
 
- Public Member Functions inherited from equalityt
  equalityt (propt &_prop, message_handlert &message_handler)
 
 
 
- Public Member Functions inherited from prop_conv_solvert
 
 
  Implementation of the decision procedure.
 
void  print_assignment (std::ostream &out) const override
  Print satisfying assignment to out.
 
  Return a textual description of the decision procedure.
 
  Return expr with variables replaced by values from satisfying assignment if available.
 
  Return value of literal l from satisfying assignment.
 
  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.
 
 
 
 
  Convert a Boolean expression and return the corresponding literal.
 
  Returns true if an expression is in the final conflict leading to UNSAT.
 
void  set_to (const exprt &expr, bool value) override
  For a Boolean expression expr, add the constraint 'current_context => expr' if value is true, otherwise add 'current_context => not expr'.
 
  Push a new context on the stack This context becomes a child context nested in the current context.
 
void  push (const std::vector< exprt > &assumptions) override
  Push assumptions in form of literal_exprt
 
  Pop whatever is on top of the stack.
 
 
 
  Set the limit for the solver to time out in seconds.
 
  Return the number of incremental solver calls.
 
 
- Public Member Functions inherited from conflict_providert
 
- Public Member Functions inherited from prop_convt
 
- 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.
 
 
- Public Member Functions inherited from solver_resource_limitst
 

Protected Types

 
 
- Protected Types inherited from boolbvt
 
typedef std::unordered_map< const exprt, bvt, irep_hashbv_cachet
 
 
typedef std::vector< std::size_t >  offset_mapt
 
- Protected Types inherited from arrayst
 
 
 
typedef std::set< exprtindex_sett
 
typedef std::map< std::size_t, index_settindex_mapt
 
 
- Protected Types inherited from equalityt
typedef std::unordered_map< const exprt, unsigned, irep_hashelementst
 
typedef std::map< std::pair< unsigned, unsigned >, literaltequalitiest
 
 
typedef std::unordered_map< const typet, typestructt, irep_hashtypemapt
 

Protected Member Functions

 
 
 
 
 
 
  Converts an expression into its gate-level representation and returns a vector of literals corresponding to the outputs of the Boolean circuit.
 
exprt  bv_get_rec (const exprt &, const bvt &, std::size_t offset) const override
 
std::optional< bvtconvert_address_of_rec (const exprt &)
 
 
 
 
 
  Given a pointer encoded in bv, extract the literals identifying the object that the pointer points to.
 
  Given a pointer encoded in bv, extract the literals representing the offset into an object that the pointer points to.
 
- Protected Member Functions inherited from boolbvt
 
  Print that the expression of x has failed conversion, then return a vector of x's width.
 
 
  Flatten <, >, <= and >= expressions.
 
  conversion from bitvector types to boolean
 
 
 
 
 
 
 
 
 
 
  index operator with constant index
 
 
 
 
 
 
 
 
  Flatten array.
 
 
 
 
 
 
  Flatten arrays constructed from a single element.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bvt  convert_update_bits (bvt src, const exprt &index, const bvt &new_value)
 
 
 
 
 
 
void  convert_update_rec (const exprt::operandst &designator, std::size_t d, const typet &type, std::size_t offset, const exprt &new_value, bvt &bv)
 
 
exprt  bv_get (const bvt &bv, const typet &type) const
 
 
  Return the model value for expr.
 
 
 
 
  create new, unique variables for the given binding
 
- Protected Member Functions inherited from arrayst
 
  adds array constraints (refine=true...lazily for the refinement loop)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
void  update_index_map (std::size_t i)
  merge the indices into the root
 
 
 
 
- Protected Member Functions inherited from equalityt
 
 
 
- Protected Member Functions inherited from prop_conv_solvert
virtual std::optional< boolget_bool (const exprt &expr) const
  Get a boolean value from the model if the formula is satisfiable.
 
 
 
 
 

Static Protected Member Functions

  Construct a pointer encoding from given encodings of object and offset.
 

Protected Attributes

 
 
std::vector< bvtnumbered_pointers
  Table that maps a 'pointer number' to its full-width bit-vector.
 
- Protected Attributes inherited from boolbvt
 
 
 
 
 
 
 
std::size_t  scope_counter = 0
 
- Protected Attributes inherited from arrayst
 
 
 
 
 
 
 
 
 
 
std::map< exprt, boolexpr_map
 
 
std::set< std::size_t >  update_indices
 
std::unordered_set< irep_idtarray_comprehension_args
 
- Protected Attributes inherited from equalityt
 
- Protected Attributes inherited from prop_conv_solvert
 
 
 
proptprop
 
 
  Assumptions on the stack.
 
std::size_t  context_literal_counter = 0
  To generate unique literal names for contexts.
 
std::vector< size_tcontext_size_stack
  assumption_stack is segmented in contexts; Number of assumptions in each context on the stack
 

Additional Inherited Members

- Public Types inherited from boolbvt
enum class   unbounded_arrayt { U_NONE , U_ALL , U_AUTO }
 
- Public Types inherited from arrayst
 
- Public Types inherited from equalityt
 
- Public Types inherited from prop_conv_solvert
 
typedef std::unordered_map< exprt, literalt, irep_hashcachet
 
- Public Types inherited from decision_proceduret
  Result of running the decision procedure. More...
 
- Public Attributes inherited from boolbvt
 
- Public Attributes inherited from prop_conv_solvert
 
 
 
- Static Protected Attributes inherited from prop_conv_solvert
static const charcontext_prefix = "prop_conv::context$"
 

Detailed Description

Definition at line 19 of file bv_pointers_wide.h.

Member Typedef Documentation

◆  postponed_listt

Definition at line 93 of file bv_pointers_wide.h.

◆  SUB

Definition at line 51 of file bv_pointers_wide.h.

Constructor & Destructor Documentation

◆  bv_pointers_widet()

bv_pointers_widet::bv_pointers_widet ( const namespacet_ns,
propt_prop,
message_handlertmessage_handler,
bool  get_array_constraints = false  
)

Definition at line 154 of file bv_pointers_wide.cpp.

Member Function Documentation

◆  add_addr()

bvt bv_pointers_widet::add_addr ( const exprtexpr )
protectedvirtual

Definition at line 847 of file bv_pointers_wide.cpp.

◆  boolbv_width()

std::size_t bv_pointers_widet::boolbv_width ( const typettype ) const
inlineoverridevirtual

Reimplemented from boolbvt.

Definition at line 30 of file bv_pointers_wide.h.

◆  bv_get_rec()

exprt bv_pointers_widet::bv_get_rec ( const exprtexpr,
const bvtbv,
std::size_t  offset 
) const
overrideprotectedvirtual

Reimplemented from boolbvt.

Definition at line 744 of file bv_pointers_wide.cpp.

◆  convert_address_of_rec()

std::optional< bvt > bv_pointers_widet::convert_address_of_rec ( const exprtexpr )
protected

Definition at line 164 of file bv_pointers_wide.cpp.

◆  convert_bitvector()

bvt bv_pointers_widet::convert_bitvector ( const exprtexpr )
overrideprotectedvirtual

Converts an expression into its gate-level representation and returns a vector of literals corresponding to the outputs of the Boolean circuit.

Parameters
expr Expression to convert
Returns
A vector of literals corresponding to the outputs of the Boolean circuit

Reimplemented from boolbvt.

Definition at line 561 of file bv_pointers_wide.cpp.

◆  convert_pointer_type()

bvt bv_pointers_widet::convert_pointer_type ( const exprtexpr )
protectedvirtual

Definition at line 299 of file bv_pointers_wide.cpp.

◆  convert_rest()

literalt bv_pointers_widet::convert_rest ( const exprtexpr )
overrideprotectedvirtual

Reimplemented from boolbvt.

Definition at line 66 of file bv_pointers_wide.cpp.

◆  do_postponed()

void bv_pointers_widet::do_postponed ( const postponedtpostponed )
protected

Definition at line 865 of file bv_pointers_wide.cpp.

◆  encode()

bvt bv_pointers_widet::encode ( const mp_integerobject,
const pointer_typettype 
) const
protected

Definition at line 780 of file bv_pointers_wide.cpp.

◆  endianness_map()

endianness_mapt bv_pointers_widet::endianness_map ( const typettype,
bool  little_endian 
) const
inlineoverridevirtual

Reimplemented from boolbvt.

Definition at line 39 of file bv_pointers_wide.h.

◆  finish_eager_conversion()

void bv_pointers_widet::finish_eager_conversion ( )
overridevirtual

Reimplemented from boolbvt.

Definition at line 943 of file bv_pointers_wide.cpp.

◆  get_object_width()

std::size_t bv_pointers_widet::get_object_width ( const pointer_typettype ) const
protected

Definition at line 21 of file bv_pointers_wide.cpp.

◆  get_offset_width()

std::size_t bv_pointers_widet::get_offset_width ( const pointer_typettype ) const
protected

Definition at line 26 of file bv_pointers_wide.cpp.

◆  object_literals()

bvt bv_pointers_widet::object_literals ( const bvtbv,
const pointer_typettype 
) const
protected

Given a pointer encoded in bv, extract the literals identifying the object that the pointer points to.

Parameters
bv Encoded pointer
type Type of the encoded pointer
Returns
Vector of literals identifying the object part of bv

Definition at line 34 of file bv_pointers_wide.cpp.

◆  object_offset_encoding()

bvt bv_pointers_widet::object_offset_encoding ( const bvtobject,
const bvtoffset 
)
staticprotected

Construct a pointer encoding from given encodings of object and offset.

Parameters
object Encoded object
offset Encoded offset
Returns
Pointer encoding

Definition at line 54 of file bv_pointers_wide.cpp.

◆  offset_arithmetic() [1/3]

bvt bv_pointers_widet::offset_arithmetic ( const pointer_typettype,
const bvtbv,
const mp_integerx 
)
protected

Definition at line 792 of file bv_pointers_wide.cpp.

◆  offset_arithmetic() [2/3]

bvt bv_pointers_widet::offset_arithmetic ( const pointer_typettype,
const bvtbv,
const mp_integerfactor,
const bvtindex_bv 
)
protected

Definition at line 821 of file bv_pointers_wide.cpp.

◆  offset_arithmetic() [3/3]

bvt bv_pointers_widet::offset_arithmetic ( const pointer_typettype,
const bvtbv,
const mp_integerfactor,
const exprtindex 
)
protected

Definition at line 803 of file bv_pointers_wide.cpp.

◆  offset_literals()

bvt bv_pointers_widet::offset_literals ( const bvtbv,
const pointer_typettype 
) const
protected

Given a pointer encoded in bv, extract the literals representing the offset into an object that the pointer points to.

Parameters
bv Encoded pointer
type Type of the encoded pointer
Returns
Vector of literals identifying the offset part of bv

Definition at line 45 of file bv_pointers_wide.cpp.

Member Data Documentation

◆  numbered_pointers

std::vector<bvt> bv_pointers_widet::numbered_pointers
protected

Table that maps a 'pointer number' to its full-width bit-vector.

Used for conversion of pointers to integers.

Definition at line 121 of file bv_pointers_wide.h.

◆  pointer_logic

pointer_logict bv_pointers_widet::pointer_logic
protected

Definition at line 45 of file bv_pointers_wide.h.

◆  postponed_list

postponed_listt bv_pointers_widet::postponed_list
protected

Definition at line 94 of file bv_pointers_wide.h.


The documentation for this class was generated from the following files:

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