Go to the documentation of this file.
34 if(expr.
id() == ID_index)
49 else if(expr.
id() == ID_member)
64 expr.
id() == ID_byte_extract_little_endian ||
65 expr.
id() == ID_byte_extract_big_endian)
78 else if(expr.
id() == ID_typecast)
86 else if(
const auto deref = expr_try_dynamic_cast<dereference_exprt>(expr))
89 if(
const auto address_of = expr_try_dynamic_cast<address_of_exprt>(pointer))
91 dest.
object() = address_of->object();
95 else if(
const auto address_of = expr_try_dynamic_cast<address_of_exprt>(expr))
98 if(
const auto deref = expr_try_dynamic_cast<dereference_exprt>(
object))
100 dest.
object() = deref->pointer();
112 if(
offset().
id() == ID_unknown)
146 :
unary_exprt(ID_field_address, std::move(compound_ptr), std::move(_type))
170 const exprt *p = &expr;
174 if(p->
id() == ID_member)
176 else if(p->
id() == ID_index)
201 const typet &type_of_operand = dereference_expr.pointer().type();
204 type_try_dynamic_cast<pointer_typet>(type_of_operand);
209 "dereference expression's operand must have a pointer type");
214 "dereference expression's type must match the base type of the type of its "
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static exprt conditional_cast(const exprt &expr, const typet &type)
#define DATA_CHECK(vm, condition, message)
This macro takes a condition which denotes a well-formedness criterion on goto programs,...
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
void build(const exprt &expr, const namespacet &ns)
Given an expression expr, attempt to find the underlying object it represents by skipping over type c...
const dereference_exprt & to_dereference_expr(const exprt &expr)
Cast an exprt to a dereference_exprt.
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
const byte_extract_exprt & to_byte_extract_expr(const exprt &expr)
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
Split an expression into a base object and a (byte) offset.
static void validate(const exprt &expr, const namespacet &ns, const validation_modet vm=validation_modet::INVARIANT)
Check that the dereference expression has the right number of operands, refers to something with a po...
object_address_exprt(const symbol_exprt &)
field_address_exprt(exprt base, const irep_idt &component_name, pointer_typet type)
constructor for field addresses.
address_of_exprt(const exprt &op)
The plus expression Associativity is not specified.
Base class for all expressions.
irep_idt object_identifier() const
Generic base class for unary expressions.
A base class for binary expressions.
const exprt & root_object() const
Expression to hold a symbol (variable)
symbol_exprt object_expr() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
typet & type()
Return the type of the expression.
An expression without operands.
unsigned int get_instance() const
Expression classes for byte-level operators.
Operator to return the address of an object.
const pointer_typet & type() const
element_address_exprt(const exprt &base, exprt index)
constructor for element addresses.
const std::string & id2string(const irep_idt &d)
const exprt & compound() const
static optionalt< smt_termt > get_identifier(const exprt &expr, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_handle_identifiers, const std::unordered_map< exprt, smt_identifier_termt, irep_hash > &expression_identifiers)
void set(const irep_idt &name, const irep_idt &value)
const exprt & struct_op() const
#define PRECONDITION(CONDITION)
bool simplify(exprt &expr, const namespacet &ns)
Binary multiplication Associativity is not specified.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
pointer_typet pointer_type(const typet &subtype)
const irep_idt & id() const
const irep_idt & component_name() const
Extract member of struct or union.
Deprecated expression utility functions.
void set_instance(unsigned int instance)
static void build_object_descriptor_rec(const namespacet &ns, const exprt &expr, object_descriptor_exprt &dest)
Build an object_descriptor_exprt from a given expr.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const typet & base_type() const
The type of the data what we point to.
optionalt< exprt > size_of_expr(const typet &type, const namespacet &ns)
const member_exprt & to_member_expr(const exprt &expr)
Cast an exprt to a member_exprt.
Semantic type conversion.
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
const typet & compound_type() const
optionalt< exprt > member_offset_expr(const member_exprt &member_expr, const namespacet &ns)
bitvector_typet c_index_type()
static void check(const exprt &expr, const validation_modet vm=validation_modet::INVARIANT)
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.