12 #include <unordered_set>
23 std::shared_ptr<const write_stack_entryt> new_entry,
36 expr.
id() == ID_member || expr.
id() == ID_symbol ||
37 expr.
id() == ID_dynamic_object);
49 : offset(offset_value)
52 static const std::unordered_set<irep_idt, irep_id_hash> integral_types = {
53 ID_signedbv, ID_unsignedbv, ID_integer};
55 integral_types.find(offset_value->type().id()) != integral_types.cend());
63 return {
offset->to_constant(),
true};
74 std::shared_ptr<const write_stack_entryt> new_entry,
78 std::shared_ptr<const offset_entryt> cast_entry =
79 std::dynamic_pointer_cast<const offset_entryt>(new_entry);
83 cast_entry->offset->to_constant(),
offset->to_constant());
An abstract version of a program environment.
sharing_ptrt< class abstract_objectt > abstract_object_pointert
virtual abstract_object_pointert eval(const exprt &expr, const namespacet &ns) const
These three are really the heart of the method.
Base class for all expressions.
const irep_idt & id() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
offset_entryt(abstract_object_pointert offset_value)
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
bool try_squash_in(std::shared_ptr< const write_stack_entryt > new_entry, const abstract_environmentt &enviroment, const namespacet &ns) override
Try to combine a new stack element with the current top of the stack.
abstract_object_pointert offset
The plus expression Associativity is not specified.
std::pair< exprt, bool > get_access_expr() const override
Get the expression part needed to read this stack entry.
simple_entryt(exprt expr)
Build a simple entry based off a single expression.
virtual bool try_squash_in(std::shared_ptr< const write_stack_entryt > new_entry, const abstract_environmentt &enviroment, const namespacet &ns)
Try to combine a new stack element with the current top of the stack.
#define PRECONDITION(CONDITION)
Represents an entry in the write_stackt.