27 if(expr.
id()==ID_symbol)
40 for(pointer_logict::objectst::const_iterator
52 if(expr.
id()==ID_index)
57 else if(expr.
id()==ID_member)
68 const typet &type)
const 76 const typet &type)
const 114 if(type.
id()==ID_pointer)
115 result=
exprt(ID_address_of, type);
116 else if(type.
id()==ID_reference)
117 result=
exprt(
"reference_to", type);
128 const exprt &src)
const 130 if(src.
type().
id()==ID_array)
149 else if(src.
type().
id()==ID_struct)
159 for(struct_typet::componentst::const_iterator
160 it=components.begin();
161 it!=components.end();
164 assert(offset>=current_offset);
166 const typet &subtype=it->type();
170 mp_integer new_offset=current_offset+sub_size;
172 if(new_offset>offset)
183 assert(new_offset<=offset);
184 current_offset=new_offset;
185 assert(current_offset<=offset);
190 else if(src.
type().
id()==ID_union)
The type of an expression.
const std::string & id2string(const irep_idt &d)
pointer_typet pointer_type(const typet &subtype)
void copy_to_operands(const exprt &expr)
std::vector< componentt > componentst
void get_dynamic_objects(std::vector< std::size_t > &objects) const
A constant literal expression.
bool get_bool(const irep_namet &name) const
signedbv_typet pointer_diff_type()
mp_integer pointer_offset_size(const typet &type, const namespacet &ns)
Extract member of struct or union.
void set_component_name(const irep_idt &component_name)
const irep_idt & id() const
void set_value(const irep_idt &value)
API to expression classes.
bool is_dynamic_object(const exprt &expr) const
exprt pointer_expr(const pointert &pointer, const typet &type) const
bool has_prefix(const std::string &s, const std::string &prefix)
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
pointer_logict(const namespacet &_ns)
Base class for all expressions.
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
const typet & subtype() const
number_type number(const T &a)
std::size_t add_object(const exprt &expr)
exprt object_rec(const mp_integer &offset, const typet &pointer_type, const exprt &src) const
std::size_t invalid_object