30 (a.
id() == ID_unsignedbv || a.
id() == ID_signedbv) &&
31 (b.
id() == ID_unsignedbv || b.
id() == ID_signedbv))
36 else if(a.
id() == ID_empty)
38 else if(b.
id() == ID_empty)
64 if(expr.
id() == ID_object_address)
66 else if(expr.
id() == ID_element_address)
68 else if(expr.
id() == ID_field_address)
79 if(a.
id() == ID_struct_tag)
82 if(b.
id() == ID_struct_tag)
85 if(a.
id() != ID_struct || b.
id() != ID_struct)
91 return a_struct.is_prefix_of(b_struct) || b_struct.is_prefix_of(a_struct);
96 if(expr.
id() == ID_object_address)
98 else if(expr.
id() == ID_field_address)
100 else if(expr.
id() == ID_element_address)
109 const std::unordered_set<symbol_exprt, irep_hash> &
address_taken,
113 if(
object.has_value())
115 auto symbol_expr =
object->object_expr();
116 auto identifier = symbol_expr.get_identifier();
117 if(identifier.starts_with(
"va_arg::"))
119 else if(identifier.starts_with(
"var_args::"))
121 else if(identifier.starts_with(
"va_args::"))
123 else if(identifier.starts_with(
"va_arg_array::"))
125 else if(identifier.starts_with(
"old::"))
127 else if(identifier ==
"return_value")
129 const auto &symbol = ns.
lookup(symbol_expr);
130 return !symbol.is_static_lifetime &&
140 src.
id() == ID_typecast &&
160 if(a.
id() == ID_object_address && b.
id() == ID_object_address)
171 else if(a.
id() == ID_element_address && b.
id() == ID_element_address)
177 auto base_same_address =
178 same_address(a_element_address.base(), b_element_address.base(), ns);
182 if(base_same_address->is_false())
188 equal_exprt(a_element_address.index(), b_element_address.index()));
191 else if(a.
id() == ID_field_address && b.
id() == ID_field_address)
198 a_field_address.type().base_type(),
199 b_field_address.type().base_type(),
205 if(a_field_address.component_name() == b_field_address.component_name())
208 return same_address(a_field_address.base(), b_field_address.base(), ns);
224 const std::unordered_set<symbol_exprt, irep_hash> &
address_taken,
249 if(same_address_opt.has_value())
250 return same_address_opt;
std::unordered_set< symbol_exprt, irep_hash > address_taken(const std::vector< exprt > &src)
const bitvector_typet & to_bitvector_type(const typet &type)
Cast a typet to a bitvector_typet.
signedbv_typet signed_char_type()
unsignedbv_typet unsigned_char_type()
std::size_t get_width() const
Base class for all expressions.
typet & type()
Return the type of the expression.
The Boolean constant false.
const irep_idt & id() const
const union_typet & follow_tag(const union_tag_typet &) const
Follow type tag of union type.
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool lookup(const irep_idt &name, const symbolt *&symbol) const override
See documentation for namespace_baset::lookup().
const typet & base_type() const
The type of the data what we point to.
The Boolean constant true.
The type of an expression, extends irept.
bool permitted_by_strict_aliasing(const typet &a, const typet &b)
bool prefix_of(const typet &a, const typet &b, const namespacet &ns)
std::optional< exprt > may_alias(const exprt &a, const exprt &b, const std::unordered_set< symbol_exprt, irep_hash > &address_taken, const namespacet &ns)
std::optional< exprt > same_address(const exprt &a, const exprt &b, const namespacet &ns)
static exprt drop_pointer_typecasts(exprt src)
static std::optional< object_address_exprt > find_object(const exprt &expr)
bool is_object_field_element(const exprt &expr)
bool stack_and_not_dirty(const exprt &expr, const std::unordered_set< symbol_exprt, irep_hash > &address_taken, const namespacet &ns)
API to expression classes for Pointers.
const field_address_exprt & to_field_address_expr(const exprt &expr)
Cast an exprt to an field_address_exprt.
const pointer_typet & to_pointer_type(const typet &type)
Cast a typet to a pointer_typet.
const object_address_exprt & to_object_address_expr(const exprt &expr)
Cast an exprt to an object_address_exprt.
const element_address_exprt & to_element_address_expr(const exprt &expr)
Cast an exprt to an element_address_exprt.
#define CHECK_RETURN(CONDITION)
#define PRECONDITION(CONDITION)
API to expression classes.
const typecast_exprt & to_typecast_expr(const exprt &expr)
Cast an exprt to a typecast_exprt.
const struct_typet & to_struct_type(const typet &type)
Cast a typet to a struct_typet.
const struct_tag_typet & to_struct_tag_type(const typet &type)
Cast a typet to a struct_tag_typet.