Go to the documentation of this file.
9 #ifndef CPROVER_UTIL_POINTER_EXPR_H
10 #define CPROVER_UTIL_POINTER_EXPR_H
73 return base.
id() == ID_object_descriptor;
137 return base.
id() == ID_dynamic_object;
184 expr.
operands().size() == 1,
"is_dynamic_object must have one operand");
194 expr.
operands().size() == 1,
"is_dynamic_object must have one operand");
205 :
unary_exprt(ID_address_of, std::move(
op), std::move(_type))
223 return base.
id() == ID_address_of;
286 "dereference expression must have one operand");
298 return base.
id() == ID_dereference;
329 #endif // CPROVER_UTIL_POINTER_EXPR_H
dynamic_object_exprt(typet type)
#define DATA_CHECK(vm, condition, message)
This macro takes a condition which denotes a well-formedness criterion on goto programs,...
bool can_cast_expr< dynamic_object_exprt >(const exprt &base)
bool can_cast_expr< address_of_exprt >(const exprt &base)
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.
The type of an expression, extends irept.
Operator to dereference a pointer.
Representation of heap-allocated objects.
Evaluates to true if the operand is a pointer to a dynamic object.
void validate_operands(const exprt &value, exprt::operandst::size_type number, const char *message, bool allow_more=false)
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...
bool can_cast_expr< object_descriptor_exprt >(const exprt &base)
address_of_exprt(const exprt &op)
Base class for all expressions.
Generic base class for unary expressions.
dereference_exprt(const exprt &op)
A base class for binary expressions.
const object_descriptor_exprt & to_object_descriptor_expr(const exprt &expr)
Cast an exprt to an object_descriptor_exprt.
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.
unsigned int get_instance() const
address_of_exprt(exprt op, pointer_typet _type)
const exprt & pointer() const
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...
void validate_expr(const object_descriptor_exprt &value)
#define PRECONDITION(CONDITION)
dereference_exprt(exprt op, typet type)
bool can_cast_expr< dereference_exprt >(const exprt &base)
const exprt & valid() const
is_dynamic_object_exprt(const exprt &op)
const irep_idt & id() const
const exprt & object() const
const dynamic_object_exprt & to_dynamic_object_expr(const exprt &expr)
Cast an exprt to a dynamic_object_exprt.
const exprt & root_object() const
object_descriptor_exprt(exprt _object)
void set_instance(unsigned int instance)
const exprt & offset() const
const address_of_exprt & to_address_of_expr(const exprt &expr)
Cast an exprt to an address_of_exprt.
Operator to return the address of an object.
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
object_descriptor_exprt()
const exprt & object() const
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
const is_dynamic_object_exprt & to_is_dynamic_object_expr(const exprt &expr)
API to expression classes.
A base class for expressions that are predicates, i.e., Boolean-typed, and that take exactly one argu...
static void check(const exprt &expr, const validation_modet vm=validation_modet::INVARIANT)