12 #include <unordered_set>
24 std::shared_ptr<const write_stack_entryt> new_entry,
53 : offset(offset_value)
56 static const std::unordered_set<irep_idt, irep_id_hash> integral_types = {
57 ID_signedbv, ID_unsignedbv, ID_integer};
59 integral_types.find(offset_value->type().id()) != integral_types.cend());
93 std::shared_ptr<const write_stack_entryt> new_entry,
97 std::shared_ptr<const offset_entryt> cast_entry =
98 std::dynamic_pointer_cast<const offset_entryt>(new_entry);
102 cast_entry->offset->to_constant(),
offset->to_constant());
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.
typet & type()
Return the type of the expression.
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)
exprt 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
void adjust_access_type(exprt &expr) const override
For an offset entry, the type of the access expression can only be determined once the access express...
The plus expression Associativity is not specified.
void adjust_access_type(exprt &expr) const override
For a simple entry, no type adjustment is needed for the access expression.
exprt 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.
const typet & subtype() const
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)
API to expression classes.
const index_exprt & to_index_expr(const exprt &expr)
Cast an exprt to an index_exprt.
Represents an entry in the write_stackt.