19 auto &type = expr.
type();
27 std::size_t s = expr.
operands().size();
31 tmp.operands().resize(s - 2);
65 "unexpected operand 0 width",
86 const exprt &new_value,
131 const exprt &new_value,
138 "convert_with_array called for unbounded array",
147 "convert_with_array expects constant array size",
154 "convert_with_array: unexpected new_value operand width",
165 const std::size_t offset =
183 const std::size_t offset =
195 const exprt &new_value,
207 std::size_t offset=0;
209 for(
const auto &
c : components)
211 const typet &subtype =
c.type();
215 if(
c.get_name() == component_name)
218 subtype == new_value.
type(),
219 "with/struct: component '" +
id2string(component_name) +
220 "' type does not match",
226 "convert_with_struct: unexpected new_value operand width",
241 const exprt &new_value,
251 "convert_with_union: unexpected new_value operand width",
API to expression classes for bitvectors.
const union_typet & to_union_type(const typet &type)
Cast a typet to a union_typet.
const union_tag_typet & to_union_tag_type(const typet &type)
Cast a typet to a union_tag_typet.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
const exprt & size() const
virtual bvt convert_with(const with_exprt &expr)
virtual const bvt & convert_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 availabl...
void convert_with_array(const array_typet &type, const exprt &index, const exprt &new_value, const bvt &prev_bv, bvt &next_bv)
bool is_unbounded_array(const typet &type) const override
void convert_with_union(const union_typet &type, const exprt &new_value, const bvt &prev_bv, bvt &next_bv)
virtual endianness_mapt endianness_map(const typet &type, bool little_endian) const
virtual std::size_t boolbv_width(const typet &type) const
void convert_with_struct(const struct_typet &type, const exprt &where, const exprt &new_value, const bvt &prev_bv, bvt &next_bv)
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Maps a big-endian offset to a little-endian offset.
Base class for all expressions.
std::vector< exprt > operandst
typet & type()
Return the type of the expression.
const irep_idt & get(const irep_idt &name) const
const irep_idt & id() const
literalt convert(const exprt &expr) override
Convert a Boolean expression and return the corresponding literal.
virtual literalt lselect(literalt a, literalt b, literalt c)=0
Structure type, corresponds to C style structs.
const componentst & components() const
std::vector< componentt > componentst
The type of an expression, extends irept.
Replaces a sub-range of a bit-vector operand.
Replaces a sub-range of a bit-vector operand.
Operator to update elements in structs and arrays.
const std::string & id2string(const irep_idt &d)
std::vector< literalt > bvt
#define PRECONDITION(CONDITION)
#define DATA_INVARIANT_WITH_DIAGNOSTICS(CONDITION, REASON,...)
API to expression classes.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.
const array_typet & to_array_type(const typet &type)
Cast a typet to an array_typet.