CBMC
boolbv.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_SOLVERS_FLATTENING_BOOLBV_H
11 #define CPROVER_SOLVERS_FLATTENING_BOOLBV_H
12 
13 //
14 // convert expression to boolean formula
15 //
16 
17 #include <util/endianness_map.h>
18 #include <util/expr.h>
19 #include <util/mp_arith.h>
20 #include <util/optional.h>
21 
23 
24 #include "bv_utils.h"
25 #include "boolbv_width.h"
26 #include "boolbv_map.h"
27 #include "arrays.h"
28 
31 class bitreverse_exprt;
32 class bswap_exprt;
33 class byte_extract_exprt;
34 class byte_update_exprt;
36 class extractbit_exprt;
37 class extractbits_exprt;
40 class member_exprt;
42 class replication_exprt;
44 class union_typet;
45 
46 class boolbvt:public arrayst
47 {
48 public:
50  const namespacet &_ns,
51  propt &_prop,
53  bool get_array_constraints = false)
56  bv_width(_ns),
57  bv_utils(_prop),
58  functions(*this),
59  map(_prop)
60  {
61  }
62 
63  virtual const bvt &convert_bv( // check cache
64  const exprt &expr,
65  const optionalt<std::size_t> expected_width = {});
66 
67  virtual bvt convert_bitvector(const exprt &expr); // no cache
68 
69  // overloading
70  exprt get(const exprt &expr) const override;
71  void set_to(const exprt &expr, bool value) override;
72  void print_assignment(std::ostream &out) const override;
73 
74  void clear_cache() override
75  {
77  bv_cache.clear();
78  }
79 
80  void finish_eager_conversion() override
81  {
85  }
86 
87  enum class unbounded_arrayt { U_NONE, U_ALL, U_AUTO };
89 
91  {
92  return get_value(bv, 0, bv.size());
93  }
94 
95  mp_integer get_value(const bvt &bv, std::size_t offset, std::size_t width);
96 
97  const boolbv_mapt &get_map() const
98  {
99  return map;
100  }
101 
102  virtual std::size_t boolbv_width(const typet &type) const
103  {
104  return bv_width(type);
105  }
106 
107  virtual endianness_mapt
108  endianness_map(const typet &type, bool little_endian) const
109  {
110  return endianness_mapt{type, little_endian, ns};
111  }
112 
113  virtual endianness_mapt endianness_map(const typet &type) const;
114 
115 protected:
118 
119  // uninterpreted functions
121 
122  // the mapping from identifiers to literals
124 
125  // overloading
126  literalt convert_rest(const exprt &expr) override;
127  virtual bool boolbv_set_equality_to_true(const equal_exprt &expr);
128 
129  // NOLINTNEXTLINE(readability/identifiers)
130  typedef arrayst SUB;
131 
132  bvt conversion_failed(const exprt &expr);
133 
134  typedef std::unordered_map<const exprt, bvt, irep_hash> bv_cachet;
136 
137  bool type_conversion(
138  const typet &src_type, const bvt &src,
139  const typet &dest_type, bvt &dest);
140 
142  virtual literalt convert_typecast(const typecast_exprt &expr);
143  virtual literalt convert_reduction(const unary_exprt &expr);
144  virtual literalt convert_onehot(const unary_exprt &expr);
145  virtual literalt convert_extractbit(const extractbit_exprt &expr);
148  virtual literalt convert_equality(const equal_exprt &expr);
150  const binary_relation_exprt &expr);
152  virtual literalt convert_quantifier(const quantifier_exprt &expr);
153 
154  virtual bvt convert_index(const exprt &array, const mp_integer &index);
155  virtual bvt convert_index(const index_exprt &expr);
156  virtual bvt convert_bswap(const bswap_exprt &expr);
157  virtual bvt convert_byte_extract(const byte_extract_exprt &expr);
158  virtual bvt convert_byte_update(const byte_update_exprt &expr);
159  virtual bvt convert_constraint_select_one(const exprt &expr);
160  virtual bvt convert_if(const if_exprt &expr);
161  virtual bvt convert_struct(const struct_exprt &expr);
162  virtual bvt convert_array(const exprt &expr);
163  virtual bvt convert_vector(const vector_exprt &expr);
164  virtual bvt convert_complex(const complex_exprt &expr);
165  virtual bvt convert_complex_real(const complex_real_exprt &expr);
166  virtual bvt convert_complex_imag(const complex_imag_exprt &expr);
168  virtual bvt convert_let(const let_exprt &);
169  virtual bvt convert_array_of(const array_of_exprt &expr);
170  virtual bvt convert_union(const union_exprt &expr);
171  virtual bvt convert_empty_union(const empty_union_exprt &expr);
172  virtual bvt convert_bv_typecast(const typecast_exprt &expr);
173  virtual bvt convert_add_sub(const exprt &expr);
174  virtual bvt convert_mult(const mult_exprt &expr);
175  virtual bvt convert_div(const div_exprt &expr);
176  virtual bvt convert_mod(const mod_exprt &expr);
177  virtual bvt convert_floatbv_op(const ieee_float_op_exprt &);
178  virtual bvt convert_floatbv_mod_rem(const binary_exprt &);
180  virtual bvt convert_member(const member_exprt &expr);
181  virtual bvt convert_with(const with_exprt &expr);
182  virtual bvt convert_update(const update_exprt &);
183  virtual bvt convert_case(const exprt &expr);
184  virtual bvt convert_cond(const cond_exprt &);
185  virtual bvt convert_shift(const binary_exprt &expr);
186  virtual bvt convert_bitwise(const exprt &expr);
187  virtual bvt convert_unary_minus(const unary_minus_exprt &expr);
188  virtual bvt convert_abs(const abs_exprt &expr);
189  virtual bvt convert_concatenation(const concatenation_exprt &expr);
190  virtual bvt convert_replication(const replication_exprt &expr);
191  virtual bvt convert_constant(const constant_exprt &expr);
192  virtual bvt convert_extractbits(const extractbits_exprt &expr);
193  virtual bvt convert_symbol(const exprt &expr);
194  virtual bvt convert_bv_reduction(const unary_exprt &expr);
195  virtual bvt convert_not(const not_exprt &expr);
196  virtual bvt convert_power(const binary_exprt &expr);
198  const function_application_exprt &expr);
199  virtual bvt convert_bitreverse(const bitreverse_exprt &expr);
200  virtual bvt convert_saturating_add_sub(const binary_exprt &expr);
202 
203  void convert_with(
204  const typet &type,
205  const exprt &op1,
206  const exprt &op2,
207  const bvt &prev_bv,
208  bvt &next_bv);
209 
210  void convert_with_bv(
211  const exprt &op1,
212  const exprt &op2,
213  const bvt &prev_bv,
214  bvt &next_bv);
215 
216  void convert_with_array(
217  const array_typet &type,
218  const exprt &op1,
219  const exprt &op2,
220  const bvt &prev_bv,
221  bvt &next_bv);
222 
223  void convert_with_union(
224  const union_typet &type,
225  const exprt &op2,
226  const bvt &prev_bv,
227  bvt &next_bv);
228 
229  void convert_with_struct(
230  const struct_typet &type,
231  const exprt &op1,
232  const exprt &op2,
233  const bvt &prev_bv,
234  bvt &next_bv);
235 
236  void convert_update_rec(
237  const exprt::operandst &designator,
238  std::size_t d,
239  const typet &type,
240  std::size_t offset,
241  const exprt &new_value,
242  bvt &bv);
243 
244  virtual exprt bv_get_unbounded_array(const exprt &) const;
245 
246  virtual exprt
247  bv_get_rec(const exprt &expr, const bvt &bv, std::size_t offset) const;
248 
249  exprt bv_get(const bvt &bv, const typet &type) const;
250  exprt bv_get_cache(const exprt &expr) const;
251 
252  // unbounded arrays
253  bool is_unbounded_array(const typet &type) const override;
254 
255  // quantifier instantiations
257  {
258  public:
260  : expr(std::move(_expr)), l(std::move(_l))
261  {
262  }
263 
266  };
267 
268  typedef std::list<quantifiert> quantifier_listt;
270 
272 
273  typedef std::vector<std::size_t> offset_mapt;
275 
276  // strings
278 
279  // scopes
280  std::size_t scope_counter = 0;
281 
284 };
285 
286 #endif // CPROVER_SOLVERS_FLATTENING_BOOLBV_H
with_exprt
Operator to update elements in structs and arrays.
Definition: std_expr.h:2423
boolbvt::convert_bv_typecast
virtual bvt convert_bv_typecast(const typecast_exprt &expr)
Definition: boolbv_typecast.cpp:20
boolbvt::bv_width
boolbv_widtht bv_width
Definition: boolbv.h:116
boolbvt::unbounded_array
unbounded_arrayt unbounded_array
Definition: boolbv.h:88
boolbvt::convert_with_array
void convert_with_array(const array_typet &type, const exprt &op1, const exprt &op2, const bvt &prev_bv, bvt &next_bv)
Definition: boolbv_with.cpp:81
boolbvt::map
boolbv_mapt map
Definition: boolbv.h:123
boolbvt::convert_member
virtual bvt convert_member(const member_exprt &expr)
Definition: boolbv_member.cpp:46
mp_integer
BigInt mp_integer
Definition: smt_terms.h:17
boolbvt::bv_cachet
std::unordered_map< const exprt, bvt, irep_hash > bv_cachet
Definition: boolbv.h:134
boolbvt::convert_bv_rel
virtual literalt convert_bv_rel(const binary_relation_exprt &)
Flatten <, >, <= and >= expressions.
Definition: boolbv_bv_rel.cpp:18
boolbvt::convert_byte_update
virtual bvt convert_byte_update(const byte_update_exprt &expr)
Definition: boolbv_byte_update.cpp:17
byte_update_exprt
Expression corresponding to op() where the bytes starting at position offset (given in number of byte...
Definition: byte_operators.h:77
mp_arith.h
boolbvt::finish_eager_conversion
void finish_eager_conversion() override
Definition: boolbv.h:80
boolbvt::convert_array_of
virtual bvt convert_array_of(const array_of_exprt &expr)
Flatten arrays constructed from a single element.
Definition: boolbv_array_of.cpp:16
boolbvt::convert_reduction
virtual literalt convert_reduction(const unary_exprt &expr)
Definition: boolbv_reduction.cpp:13
boolbvt::type_conversion
bool type_conversion(const typet &src_type, const bvt &src, const typet &dest_type, bvt &dest)
Definition: boolbv_typecast.cpp:33
boolbvt::convert_cond
virtual bvt convert_cond(const cond_exprt &)
Definition: boolbv_cond.cpp:13
boolbvt::convert_bitvector
virtual bvt convert_bitvector(const exprt &expr)
Converts an expression into its gate-level representation and returns a vector of literals correspond...
Definition: boolbv.cpp:97
boolbvt::is_unbounded_array
bool is_unbounded_array(const typet &type) const override
Definition: boolbv.cpp:518
boolbvt::bv_get_rec
virtual exprt bv_get_rec(const exprt &expr, const bvt &bv, std::size_t offset) const
Definition: boolbv_get.cpp:52
typet
The type of an expression, extends irept.
Definition: type.h:28
bvt
std::vector< literalt > bvt
Definition: literal.h:201
boolbvt::fresh_binding
binding_exprt::variablest fresh_binding(const binding_exprt &)
create new, unique variables for the given binding
Definition: boolbv.cpp:537
boolbvt::quantifier_listt
std::list< quantifiert > quantifier_listt
Definition: boolbv.h:268
optional.h
boolbvt::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'.
Definition: boolbv.cpp:508
boolbvt::convert_complex
virtual bvt convert_complex(const complex_exprt &expr)
Definition: boolbv_complex.cpp:13
numberingt< irep_idt >
if_exprt
The trinary if-then-else operator.
Definition: std_expr.h:2322
boolbvt::boolbvt
boolbvt(const namespacet &_ns, propt &_prop, message_handlert &message_handler, bool get_array_constraints=false)
Definition: boolbv.h:49
boolbvt::convert_with_struct
void convert_with_struct(const struct_typet &type, const exprt &op1, const exprt &op2, const bvt &prev_bv, bvt &next_bv)
Definition: boolbv_with.cpp:174
complex_real_exprt
Real part of the expression describing a complex number.
Definition: std_expr.h:1925
boolbvt::convert_mod
virtual bvt convert_mod(const mod_exprt &expr)
Definition: boolbv_mod.cpp:12
union_exprt
Union constructor from single element.
Definition: std_expr.h:1707
bv_utils.h
boolbvt::convert_vector
virtual bvt convert_vector(const vector_exprt &expr)
Definition: boolbv_vector.cpp:12
boolbvt::convert_symbol
virtual bvt convert_symbol(const exprt &expr)
Definition: boolbv.cpp:284
boolbvt::convert_index
virtual bvt convert_index(const exprt &array, const mp_integer &index)
index operator with constant index
Definition: boolbv_index.cpp:284
exprt
Base class for all expressions.
Definition: expr.h:55
unary_exprt
Generic base class for unary expressions.
Definition: std_expr.h:313
binary_exprt
A base class for binary expressions.
Definition: std_expr.h:582
overflow_result_exprt
An expression returning both the result of the arithmetic operation under wrap-around semantics as we...
Definition: bitvector_expr.h:1304
boolbvt::convert_onehot
virtual literalt convert_onehot(const unary_exprt &expr)
Definition: boolbv_onehot.cpp:12
boolbvt::convert_abs
virtual bvt convert_abs(const abs_exprt &expr)
Definition: boolbv_abs.cpp:17
concatenation_exprt
Concatenation of bit-vector operands.
Definition: bitvector_expr.h:607
quantifier_exprt
A base class for quantifier expressions.
Definition: mathematical_expr.h:267
boolbvt::convert_union
virtual bvt convert_union(const union_exprt &expr)
Definition: boolbv_union.cpp:11
vector_exprt
Vector constructor from list of elements.
Definition: std_expr.h:1671
functions.h
div_exprt
Division.
Definition: std_expr.h:1096
boolbvt::convert_case
virtual bvt convert_case(const exprt &expr)
Definition: boolbv_case.cpp:13
equal_exprt
Equality.
Definition: std_expr.h:1305
arrayst::finish_eager_conversion
void finish_eager_conversion() override
Definition: arrays.h:41
boolbvt::functions
functionst functions
Definition: boolbv.h:120
boolbvt::convert_add_sub
virtual bvt convert_add_sub(const exprt &expr)
Definition: boolbv_add_sub.cpp:16
boolbvt::unbounded_arrayt::U_AUTO
@ U_AUTO
replication_exprt
Bit-vector replication.
Definition: bitvector_expr.h:535
boolbvt::convert_constant
virtual bvt convert_constant(const constant_exprt &expr)
Definition: boolbv_constant.cpp:13
boolbvt::convert_extractbit
virtual literalt convert_extractbit(const extractbit_exprt &expr)
Definition: boolbv_extractbit.cpp:19
boolbvt::convert_overflow_result
virtual bvt convert_overflow_result(const overflow_result_exprt &expr)
Definition: boolbv_overflow.cpp:194
boolbvt::convert_concatenation
virtual bvt convert_concatenation(const concatenation_exprt &expr)
Definition: boolbv_concatenation.cpp:14
functionst
Definition: functions.h:22
boolbvt::quantifiert::quantifiert
quantifiert(exprt _expr, literalt _l)
Definition: boolbv.h:259
expr.h
struct_exprt
Struct constructor from list of elements.
Definition: std_expr.h:1818
bv_utilst
Definition: bv_utils.h:23
boolbvt::convert_mult
virtual bvt convert_mult(const mult_exprt &expr)
Definition: boolbv_mult.cpp:13
boolbvt::convert_shift
virtual bvt convert_shift(const binary_exprt &expr)
Definition: boolbv_shift.cpp:15
namespacet
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
Definition: namespace.h:90
boolbvt::convert_byte_extract
virtual bvt convert_byte_extract(const byte_extract_exprt &expr)
Definition: boolbv_byte_extract.cpp:35
boolbvt::boolbv_set_equality_to_true
virtual bool boolbv_set_equality_to_true(const equal_exprt &expr)
Definition: boolbv.cpp:477
boolbvt::convert_array
virtual bvt convert_array(const exprt &expr)
Flatten array.
Definition: boolbv_array.cpp:16
boolbvt::unbounded_arrayt
unbounded_arrayt
Definition: boolbv.h:87
boolbvt::bv_cache
bv_cachet bv_cache
Definition: boolbv.h:135
prop_conv_solvert::clear_cache
virtual void clear_cache()
Definition: prop_conv_solver.h:78
boolbvt::convert_extractbits
virtual bvt convert_extractbits(const extractbits_exprt &expr)
Definition: boolbv_extractbits.cpp:14
boolbvt::boolbv_width
virtual std::size_t boolbv_width(const typet &type) const
Definition: boolbv.h:102
floatbv_typecast_exprt
Semantic type conversion from/to floating-point formats.
Definition: floatbv_expr.h:18
boolbvt::convert_bv
virtual const bvt & convert_bv(const exprt &expr, const optionalt< std::size_t > expected_width={})
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
Definition: boolbv.cpp:39
binary_overflow_exprt
A Boolean expression returning true, iff operation kind would result in an overflow when applied to o...
Definition: bitvector_expr.h:704
boolbvt::convert_empty_union
virtual bvt convert_empty_union(const empty_union_exprt &expr)
Definition: boolbv_union.cpp:38
boolbvt::convert_floatbv_typecast
virtual bvt convert_floatbv_typecast(const floatbv_typecast_exprt &expr)
Definition: boolbv_floatbv_op.cpp:20
boolbvt::convert_bitreverse
virtual bvt convert_bitreverse(const bitreverse_exprt &expr)
Definition: boolbv_bitreverse.cpp:13
boolbvt::convert_verilog_case_equality
virtual literalt convert_verilog_case_equality(const binary_relation_exprt &expr)
Definition: boolbv_equality.cpp:60
arrayst::ns
const namespacet & ns
Definition: arrays.h:56
array_of_exprt
Array constructor from single element.
Definition: std_expr.h:1497
boolbvt::convert_if
virtual bvt convert_if(const if_exprt &expr)
Definition: boolbv_if.cpp:12
boolbvt::convert_complex_real
virtual bvt convert_complex_real(const complex_real_exprt &expr)
Definition: boolbv_complex.cpp:37
boolbvt::convert_ieee_float_rel
virtual literalt convert_ieee_float_rel(const binary_relation_exprt &)
Definition: boolbv_ieee_float_rel.cpp:17
boolbvt::scope_counter
std::size_t scope_counter
Definition: boolbv.h:280
function_application_exprt
Application of (mathematical) function.
Definition: mathematical_expr.h:196
mult_exprt
Binary multiplication Associativity is not specified.
Definition: std_expr.h:1051
binding_exprt::variablest
std::vector< symbol_exprt > variablest
Definition: std_expr.h:3054
boolbvt::convert_update_rec
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)
Definition: boolbv_update.cpp:33
unary_minus_exprt
The unary minus expression.
Definition: std_expr.h:422
boolbvt::bv_get_cache
exprt bv_get_cache(const exprt &expr) const
Definition: boolbv_get.cpp:277
boolbvt::convert_bv_reduction
virtual bvt convert_bv_reduction(const unary_exprt &expr)
Definition: boolbv_reduction.cpp:54
boolbvt::convert_with_union
void convert_with_union(const union_typet &type, const exprt &op2, const bvt &prev_bv, bvt &next_bv)
Definition: boolbv_with.cpp:221
boolbvt::convert_saturating_add_sub
virtual bvt convert_saturating_add_sub(const binary_exprt &expr)
Definition: boolbv_add_sub.cpp:143
message_handlert
Definition: message.h:27
empty_union_exprt
Union constructor to support unions without any member (a GCC/Clang feature).
Definition: std_expr.h:1773
binding_exprt
A base class for variable bindings (quantifiers, let, lambda)
Definition: std_expr.h:3051
exprt::operandst
std::vector< exprt > operandst
Definition: expr.h:58
complex_exprt
Complex constructor from a pair of numbers.
Definition: std_expr.h:1857
abs_exprt
Absolute value.
Definition: std_expr.h:378
union_typet
The union type.
Definition: c_types.h:124
boolbvt::convert_constraint_select_one
virtual bvt convert_constraint_select_one(const exprt &expr)
Definition: boolbv_constraint_select_one.cpp:12
boolbvt::clear_cache
void clear_cache() override
Definition: boolbv.h:74
boolbvt::convert_bswap
virtual bvt convert_bswap(const bswap_exprt &expr)
Definition: boolbv_bswap.cpp:13
optionalt
nonstd::optional< T > optionalt
Definition: optional.h:35
boolbvt::get_value
mp_integer get_value(const bvt &bv)
Definition: boolbv.h:90
boolbvt::unbounded_arrayt::U_NONE
@ U_NONE
update_exprt
Operator to update elements in structs and arrays.
Definition: std_expr.h:2607
boolbvt::quantifier_list
quantifier_listt quantifier_list
Definition: boolbv.h:269
boolbvt::bv_get_unbounded_array
virtual exprt bv_get_unbounded_array(const exprt &) const
Definition: boolbv_get.cpp:289
boolbvt::quantifiert::expr
exprt expr
Definition: boolbv.h:264
endianness_map.h
boolbvt::quantifiert::l
literalt l
Definition: boolbv.h:265
extractbit_exprt
Extracts a single bit of a bit-vector operand.
Definition: bitvector_expr.h:380
boolbvt::SUB
arrayst SUB
Definition: boolbv.h:130
member_exprt
Extract member of struct or union.
Definition: std_expr.h:2793
boolbvt::convert_let
virtual bvt convert_let(const let_exprt &)
Definition: boolbv_let.cpp:15
boolbv_widtht
Definition: boolbv_width.h:18
boolbvt::convert_bitwise
virtual bvt convert_bitwise(const exprt &expr)
Definition: boolbv_bitwise.cpp:13
boolbvt::get_map
const boolbv_mapt & get_map() const
Definition: boolbv.h:97
unary_overflow_exprt
A Boolean expression returning true, iff operation kind would result in an overflow when applied to t...
Definition: bitvector_expr.h:871
boolbvt::convert_floatbv_op
virtual bvt convert_floatbv_op(const ieee_float_op_exprt &)
Definition: boolbv_floatbv_op.cpp:86
arrays.h
propt
TO_BE_DOCUMENTED.
Definition: prop.h:22
cond_exprt
this is a parametric version of an if-expression: it returns the value of the first case (using the o...
Definition: std_expr.h:3287
struct_typet
Structure type, corresponds to C style structs.
Definition: std_types.h:230
array_typet
Arrays with given size.
Definition: std_types.h:762
boolbvt::convert_struct
virtual bvt convert_struct(const struct_exprt &expr)
Definition: boolbv_struct.cpp:13
boolbvt::quantifiert
Definition: boolbv.h:256
functionst::finish_eager_conversion
virtual void finish_eager_conversion()
Definition: functions.h:36
boolbv_width.h
boolbvt::convert_binary_overflow
virtual literalt convert_binary_overflow(const binary_overflow_exprt &expr)
Definition: boolbv_overflow.cpp:114
boolbvt::bv_get
exprt bv_get(const bvt &bv, const typet &type) const
Definition: boolbv_get.cpp:270
boolbvt::bv_utils
bv_utilst bv_utils
Definition: boolbv.h:117
boolbvt::string_numbering
numberingt< irep_idt > string_numbering
Definition: boolbv.h:277
boolbvt::convert_with_bv
void convert_with_bv(const exprt &op1, const exprt &op2, const bvt &prev_bv, bvt &next_bv)
Definition: boolbv_with.cpp:144
boolbvt::unbounded_arrayt::U_ALL
@ U_ALL
binary_relation_exprt
A base class for relations, i.e., binary predicates whose two operands have the same type.
Definition: std_expr.h:706
boolbvt::finish_eager_conversion_quantifiers
void finish_eager_conversion_quantifiers()
Definition: boolbv_quantifier.cpp:274
complex_imag_exprt
Imaginary part of the expression describing a complex number.
Definition: std_expr.h:1970
literalt
Definition: literal.h:25
byte_extract_exprt
Expression of type type extracted from some object op starting at position offset (given in number of...
Definition: byte_operators.h:28
endianness_mapt
Maps a big-endian offset to a little-endian offset.
Definition: endianness_map.h:30
boolbvt
Definition: boolbv.h:46
boolbvt::convert_equality
virtual literalt convert_equality(const equal_exprt &expr)
Definition: boolbv_equality.cpp:16
boolbv_mapt
Definition: boolbv_map.h:22
ieee_float_op_exprt
IEEE floating-point operations These have two data operands (op0 and op1) and one rounding mode (op2)...
Definition: floatbv_expr.h:363
boolbvt::convert_unary_minus
virtual bvt convert_unary_minus(const unary_minus_exprt &expr)
Definition: boolbv_unary_minus.cpp:20
boolbvt::conversion_failed
bvt conversion_failed(const exprt &expr)
Print that the expression of x has failed conversion, then return a vector of x's width.
Definition: boolbv.cpp:83
bswap_exprt
The byte swap expression.
Definition: bitvector_expr.h:18
boolbvt::convert_replication
virtual bvt convert_replication(const replication_exprt &expr)
Definition: boolbv_replication.cpp:14
boolbvt::convert_quantifier
virtual literalt convert_quantifier(const quantifier_exprt &expr)
Definition: boolbv_quantifier.cpp:249
extractbits_exprt
Extracts a sub-range of a bit-vector operand.
Definition: bitvector_expr.h:447
boolbvt::convert_array_comprehension
virtual bvt convert_array_comprehension(const array_comprehension_exprt &)
Definition: boolbv.cpp:249
boolbvt::endianness_map
virtual endianness_mapt endianness_map(const typet &type, bool little_endian) const
Definition: boolbv.h:108
index_exprt
Array index operator.
Definition: std_expr.h:1409
boolbvt::convert_floatbv_mod_rem
virtual bvt convert_floatbv_mod_rem(const binary_exprt &)
Definition: boolbv_floatbv_mod_rem.cpp:15
boolbvt::convert_not
virtual bvt convert_not(const not_exprt &expr)
Definition: boolbv_not.cpp:13
typecast_exprt
Semantic type conversion.
Definition: std_expr.h:2016
boolbvt::convert_typecast
virtual literalt convert_typecast(const typecast_exprt &expr)
conversion from bitvector types to boolean
Definition: boolbv_typecast.cpp:620
boolbvt::offset_mapt
std::vector< std::size_t > offset_mapt
Definition: boolbv.h:273
boolbvt::build_offset_map
offset_mapt build_offset_map(const struct_typet &src)
Definition: boolbv.cpp:566
arrayst
Definition: arrays.h:32
array_comprehension_exprt
Expression to define a mapping from an argument (index) to elements.
Definition: std_expr.h:3350
boolbvt::convert_unary_overflow
virtual literalt convert_unary_overflow(const unary_overflow_exprt &expr)
Definition: boolbv_overflow.cpp:180
boolbvt::convert_rest
literalt convert_rest(const exprt &expr) override
Definition: boolbv.cpp:319
arrayst::get_array_constraints
bool get_array_constraints
Definition: arrays.h:113
boolbvt::convert_power
virtual bvt convert_power(const binary_exprt &expr)
Definition: boolbv_power.cpp:12
constant_exprt
A constant literal expression.
Definition: std_expr.h:2941
arrayst::message_handler
message_handlert & message_handler
Definition: arrays.h:58
boolbvt::convert_function_application
virtual bvt convert_function_application(const function_application_exprt &expr)
Definition: boolbv.cpp:308
boolbvt::convert_div
virtual bvt convert_div(const div_exprt &expr)
Definition: boolbv_div.cpp:13
boolbvt::print_assignment
void print_assignment(std::ostream &out) const override
Print satisfying assignment to out.
Definition: boolbv.cpp:560
boolbvt::get
exprt get(const exprt &expr) const override
Return expr with variables replaced by values from satisfying assignment if available.
Definition: boolbv_get.cpp:21
let_exprt
A let expression.
Definition: std_expr.h:3141
boolbv_map.h
mod_exprt
Modulo defined as lhs-(rhs * truncate(lhs/rhs)).
Definition: std_expr.h:1167
boolbvt::convert_update
virtual bvt convert_update(const update_exprt &)
Definition: boolbv_update.cpp:15
bitreverse_exprt
Reverse the order of bits in a bit-vector.
Definition: bitvector_expr.h:1156
not_exprt
Boolean negation.
Definition: std_expr.h:2277
boolbvt::convert_with
virtual bvt convert_with(const with_exprt &expr)
Definition: boolbv_with.cpp:16
boolbvt::convert_complex_imag
virtual bvt convert_complex_imag(const complex_imag_exprt &expr)
Definition: boolbv_complex.cpp:48