28 if(expr.
id()==ID_symbol)
53 if(expr.
id()==ID_index)
58 else if(expr.
id()==ID_member)
119 const exprt &src)
const 121 if(src.
type().
id()==ID_array)
140 else if(src.
type().
id()==ID_struct)
150 for(
const auto &c : components)
152 assert(offset>=current_offset);
154 const typet &subtype=c.type();
158 mp_integer new_offset=current_offset+sub_size;
160 if(new_offset>offset)
169 assert(new_offset<=offset);
170 current_offset=new_offset;
171 assert(current_offset<=offset);
176 else if(src.
type().
id()==ID_union)
The type of an expression.
number_type number(const key_type &a)
const std::string & id2string(const irep_idt &d)
pointer_typet pointer_type(const typet &subtype)
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)
Compute the size of a type in bytes, rounding up to full bytes.
Extract member of struct or union.
const irep_idt & id() const
void set_value(const irep_idt &value)
API to expression classes.
bool is_dynamic_object(const exprt &expr) const
bool has_prefix(const std::string &s, const std::string &prefix)
const symbol_exprt & to_symbol_expr(const exprt &expr)
Cast a generic exprt to a symbol_exprt.
const struct_typet & to_struct_type(const typet &type)
Cast a generic typet to a struct_typet.
Operator to return the address of an object.
exprt pointer_expr(const pointert &pointer, const pointer_typet &type) const
typename data_typet::const_iterator const_iterator
pointer_logict(const namespacet &_ns)
Base class for all expressions.
std::string to_string(const string_constraintt &expr)
Used for debug printing.
const typet & subtype() const
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