35 op_type.
id()==ID_struct)
39 while(operands.size()>1)
41 exprt &op1=operands[operands.size()-2];
42 exprt &op2=operands[operands.size()-1];
44 if(op1.
get(ID_component_name)==component_name)
57 operands.resize(operands.size()-2);
71 else if(op_type.
id()==ID_union)
75 if(with_expr.
where().
get(ID_component_name)==component_name)
87 else if(op.
id()==ID_update)
90 op_type.
id()==ID_struct)
96 if(designator.size()==1 &&
97 designator.front().id()==ID_member_designator)
99 if(designator.front().get(ID_component_name)==component_name)
112 else if(op_type.
id()==ID_struct)
126 else if(op.
id()==ID_struct ||
127 op.
id()==ID_constant)
129 if(op_type.
id()==ID_struct)
143 else if(op.
id()==ID_byte_extract_little_endian ||
144 op.
id()==ID_byte_extract_big_endian)
146 if(op_type.
id()==ID_struct)
155 if(component.
is_nil() || component.
type().
id()==ID_c_bit_field)
163 const exprt &struct_offset=op.
op1();
176 else if(op.
id()==ID_union && op_type.
id()==ID_union)
195 if(bits.has_value() &&
198 std::string bits_cut=std::string(*bits, 0,
integer2size_t(target_bits));
210 else if(op.
id() == ID_typecast)
221 else if(op.
id()==ID_if)
const if_exprt & to_if_expr(const exprt &expr)
Cast a generic exprt to an if_exprt.
The type of an expression.
bool simplify_member(exprt &expr)
bool simplify_node(exprt &expr)
Operator to update elements in structs and arrays.
bool base_type_eq(const typet &type1, const typet &type2, const namespacet &ns)
exprt::operandst & designator()
mp_integer member_offset(const struct_typet &type, const irep_idt &member, const namespacet &ns)
The trinary if-then-else operator.
mp_integer pointer_offset_size(const typet &type, const namespacet &ns)
Compute the size of a type in bytes, rounding up to full bytes.
Extract member of struct or union.
const exprt & compound() const
const irep_idt & id() const
Expression classes for byte-level operators.
const update_exprt & to_update_expr(const exprt &expr)
Cast a generic exprt to an update_exprt.
API to expression classes.
const irep_idt & get(const irep_namet &name) const
const member_exprt & to_member_expr(const exprt &expr)
Cast a generic exprt to a member_exprt.
const typet & follow(const typet &) const
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
exprt bits2expr(const std::string &bits, const typet &type, bool little_endian)
dstringt has one field, an unsigned integer no which is an index into a static table of strings...
bool has_component(const irep_idt &component_name) const
std::vector< exprt > operandst
const with_exprt & to_with_expr(const exprt &expr)
Cast a generic exprt to a with_exprt.
bool simplify_rec(exprt &expr)
Base class for all expressions.
std::size_t component_number(const irep_idt &component_name) const
const union_exprt & to_union_expr(const exprt &expr)
Cast a generic exprt to a union_exprt.
Operator to update elements in structs and arrays.
irep_idt get_component_name() const
optionalt< std::string > expr2bits(const exprt &, bool little_endian)
std::size_t integer2size_t(const mp_integer &n)
const componentt & get_component(const irep_idt &component_name) const