23 result.reserve(src.size());
25 for(std::size_t
i=0;
i<src.size();
i++)
112 if(index.has_value())
116 for(std::size_t
i=0;
i<width;
i++)
140 for(std::size_t
i=0;
i<bytes;
i++)
144 for(std::size_t
j=0;
j<width;
j++)
160 for(std::size_t
i=0;
i<bytes;
i++)
167 for(std::size_t
j=0;
j<width;
j++)
Expression classes for byte-level operators.
const c_bit_field_typet & to_c_bit_field_type(const typet &type)
Cast a typet to a c_bit_field_typet.
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
void set_width(std::size_t width)
virtual bvt convert_byte_extract(const byte_extract_exprt &expr)
bool is_unbounded_array(const typet &type) const override
virtual const bvt & convert_bv(const exprt &expr, const optionalt< std::size_t > expected_width=nullopt)
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
bvt conversion_failed(const exprt &expr)
Print that the expression of x has failed conversion, then return a vector of x's width.
virtual endianness_mapt endianness_map(const typet &type, bool little_endian) const
virtual std::size_t boolbv_width(const typet &type) const
Maps a big-endian offset to a little-endian offset.
size_t number_of_bits() const
size_t map_bit(size_t bit) const
Base class for all expressions.
typet & type()
Return the type of the expression.
const irep_idt & id() const
Split an expression into a base object and a (byte) offset.
void build(const exprt &expr, const namespacet &ns)
Given an expression expr, attempt to find the underlying object it represents by skipping over type c...
static const exprt & root_object(const exprt &expr)
The plus expression Associativity is not specified.
literalt convert(const exprt &expr) override
Convert a Boolean expression and return the corresponding literal.
void l_set_to_true(literalt a)
virtual literalt land(literalt a, literalt b)=0
virtual literalt limplies(literalt a, literalt b)=0
virtual literalt lselect(literalt a, literalt b, literalt c)=0
virtual bvt new_variables(std::size_t width)
generates a bitvector of given width with new variables
virtual literalt new_variable()=0
virtual literalt lequal(literalt a, literalt b)=0
virtual bool has_set_to() const
static exprt conditional_cast(const exprt &expr, const typet &type)
The type of an expression, extends irept.
std::vector< literalt > bvt
literalt const_literal(bool value)
API to expression classes for Pointers.
optionalt< mp_integer > pointer_offset_size(const typet &type, const namespacet &ns)
Compute the size of a type in bytes, rounding up to full bytes.
exprt lower_byte_extract(const byte_extract_exprt &src, const namespacet &ns)
rewrite byte extraction from an array to byte extraction from a concatenation of array index expressi...
#define CHECK_RETURN(CONDITION)
#define PRECONDITION(CONDITION)
API to expression classes.