23 if(struct_op_type.
id()==ID_union)
31 else if(struct_op_type.
id()==ID_struct)
39 for(struct_typet::componentst::const_iterator
40 it=components.begin();
44 const typet &subtype=it->type();
47 if(it->get_name()==component_name)
52 std::cout <<
"DEBUG " << expr.
pretty() <<
"\n";
56 error() <<
"member: component type does not match: " 57 << subtype.
pretty() <<
" vs. " 64 assert(offset+sub_width<=struct_bv.size());
66 for(std::size_t i=0; i<sub_width; i++)
67 bv[i]=struct_bv[offset+i];
76 error() <<
"component " << component_name
77 <<
" not found in structure" <<
eom;
83 error() <<
"member takes struct or union operand" <<
eom;
The type of an expression.
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
bool base_type_eq(const typet &type1, const typet &type2, const namespacet &ns)
boolbv_widtht boolbv_width
std::vector< componentt > componentst
const componentst & components() const
static mstreamt & eom(mstreamt &m)
Extract member of struct or union.
const irep_idt & id() const
Expression classes for byte-level operators.
virtual const bvt & convert_bv(const exprt &expr)
const source_locationt & find_source_location() const
source_locationt source_location
irep_idt byte_extract_id()
const typet & follow(const typet &) const
bitvector_typet index_type()
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
Base class for all expressions.
const exprt & struct_op() const
irep_idt get_component_name() const
virtual bvt convert_member(const member_exprt &expr)
std::vector< literalt > bvt