36 op_type.
id()==ID_struct)
40 while(operands.size()>1)
42 exprt &op1=operands[operands.size()-2];
43 exprt &op2=operands[operands.size()-1];
45 if(op1.
get(ID_component_name)==component_name)
58 operands.resize(operands.size()-2);
72 else if(op_type.
id()==ID_union)
76 if(with_expr.
where().
get(ID_component_name)==component_name)
88 else if(op.
id()==ID_update)
91 op_type.
id()==ID_struct)
97 if(designator.size()==1 &&
98 designator.front().id()==ID_member_designator)
100 if(designator.front().get(ID_component_name)==component_name)
113 else if(op_type.
id()==ID_struct)
127 else if(op.
id()==ID_struct ||
128 op.
id()==ID_constant)
130 if(op_type.
id()==ID_struct)
144 else if(op.
id()==ID_byte_extract_little_endian ||
145 op.
id()==ID_byte_extract_big_endian)
147 if(op_type.
id()==ID_struct)
156 if(component.
is_nil() || component.
type().
id()==ID_c_bit_field)
164 const exprt &struct_offset=op.
op1();
178 else if(op.
id()==ID_union && op_type.
id()==ID_union)
199 std::string bits_cut=std::string(bits, 0,
integer2size_t(target_bits));
211 else if(op.
id()==ID_if)
const with_exprt & to_with_expr(const exprt &expr)
Cast a generic exprt to a with_exprt.
The type of an expression.
const typet & follow(const typet &src) const
bool simplify_member(exprt &expr)
bool simplify_node(exprt &expr)
Operator to update elements in structs and arrays.
void copy_to_operands(const exprt &expr)
exprt::operandst & designator()
mp_integer member_offset(const struct_typet &type, const irep_idt &member, const namespacet &ns)
const member_exprt & to_member_expr(const exprt &expr)
Cast a generic exprt to a member_exprt.
std::string expr2bits(const exprt &expr, bool little_endian)
The trinary if-then-else operator.
mp_integer pointer_offset_size(const typet &type, const namespacet &ns)
Extract member of struct or union.
const exprt & compound() const
const irep_idt & id() const
const if_exprt & to_if_expr(const exprt &expr)
Cast a generic exprt to an if_exprt.
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 union_exprt & to_union_expr(const exprt &expr)
Cast a generic exprt to a union_exprt.
exprt bits2expr(const std::string &bits, const typet &type, bool little_endian)
bool has_component(const irep_idt &component_name) const
std::vector< exprt > operandst
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
bool simplify_rec(exprt &expr)
Base class for all expressions.
std::size_t component_number(const irep_idt &component_name) const
Operator to update elements in structs and arrays.
irep_idt get_component_name() const
std::size_t integer2size_t(const mp_integer &n)
const componentt & get_component(const irep_idt &component_name) const