Go to the documentation of this file.
20 : t(type), bottom(false), top(true)
25 : t(type), bottom(bottom), top(top)
34 : t(expr.type()), bottom(false), top(true)
43 : t(type), bottom(false), top(true)
62 if(
is_top() || other->bottom)
67 merged->bottom =
false;
68 return merged->abstract_object_merge_internal(other);
75 return shared_from_this();
96 return met->abstract_object_meet_internal(other);
103 return shared_from_this();
108 return (expr.
id() == ID_plus) && (expr.
type().
id() == ID_pointer) &&
114 const std::vector<abstract_object_pointert> &operands,
123 const exprt &const_op = op_abstract_object->to_constant();
124 op = const_op.
is_nil() ? op : const_op;
133 const exprt &const_op = op_abstract_object->to_constant();
147 const std::stack<exprt> &stack,
148 const exprt &specifier,
150 bool merging_write)
const
216 result = result->merge_location_context(merge_location);
219 return {result, result != op1};
228 ? op1->abstract_object_merge(op2)
229 : op1->merge(op2, widen_mode);
232 return {result, result != op1};
238 return is_top() || other->is_bottom() || other->is_top();
246 ? op1->abstract_object_meet(op2)
249 return {result, result != op1};
255 return is_bottom() ||
is_top() || other->is_bottom() || other->is_top();
261 return shared_from_this();
267 return shared_from_this();
279 for(
auto &item : view)
281 out << (first ?
"" :
", ") << item.first;
297 for(
auto &item : delta_view)
299 out << (first ?
"" :
", ") << item.k <<
"=" << item.is_in_both_maps();
307 return shared_from_this();
316 const auto &this_ptr = shared_from_this();
318 visited.insert(this_ptr);
static void dump_map(std::ostream out, const shared_mapt &m)
std::vector< delta_view_itemt > delta_viewt
Delta view of the key-value pairs in two maps.
#define UNREACHABLE
This should be used to mark dead code.
virtual abstract_object_pointert abstract_object_meet_internal(const abstract_object_pointert &other) const
Helper function for base meet, in case additional work was needed.
void get_delta_view(const sharing_mapt &other, delta_viewt &delta_view, const bool only_common=true) const
Get a delta view of the elements in the map.
sharing_ptrt< class abstract_objectt > abstract_object_pointert
abstract_object_pointert abstract_object_merge(const abstract_object_pointert &other) const
Create a new abstract object that is the result of the merge, unless the object would be unchanged,...
virtual bool is_top() const
Find out if the abstract object is top.
virtual void output(std::ostream &out, const class ai_baset &ai, const namespacet &ns) const
Print the value of the abstract object.
bool is_number(const typet &type)
Returns true if the type is a rational, real, integer, natural, complex, unsignedbv,...
goto_programt::const_targett locationt
The type of an expression, extends irept.
void get_view(V &view) const
Get a view of the elements in the map A view is a list of pairs with the components being const refer...
virtual const typet & type() const
Get the real type of the variable this abstract object is representing.
bool should_use_base_meet(const abstract_object_pointert &other) const
Helper function to decide if base meet implementation should be used.
Base class for all expressions.
virtual void get_statistics(abstract_object_statisticst &statistics, abstract_object_visitedt &visited, const abstract_environmentt &env, const namespacet &ns) const
internal_sharing_ptrt< class abstract_objectt > internal_abstract_object_pointert
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.
std::vector< view_itemt > viewt
View of the key-value pairs in the map.
static combine_result merge(const abstract_object_pointert &op1, const abstract_object_pointert &op2, const locationt &merge_location, const widen_modet &widen_mode)
virtual abstract_object_pointert abstract_object_factory(const typet &type, const namespacet &ns, bool top, bool bottom) const
Look at the configuration for the sensitivity and create an appropriate abstract_object.
#define PRECONDITION(CONDITION)
virtual exprt to_constant() const
Converts to a constant expression if possible.
exprt simplify_expr(exprt src, const namespacet &ns)
static void dump_map_diff(std::ostream out, const shared_mapt &m1, const shared_mapt &m2)
Dump all elements in m1 that are different or missing in m2.
virtual abstract_object_pointert eval(const exprt &expr, const namespacet &ns) const
These three are really the heart of the method.
const irep_idt & id() const
static bool is_pointer_addition(const exprt &expr)
The Boolean constant false.
std::set< abstract_object_pointert > abstract_object_visitedt
static combine_result meet(const abstract_object_pointert &op1, const abstract_object_pointert &op2)
Interface method for the meet operation.
abstract_object_pointert abstract_object_meet(const abstract_object_pointert &other) const
Helper function for base meet.
virtual abstract_object_pointert unwrap_context() const
This is the basic interface of the abstract interpreter with default implementations of the core func...
virtual bool verify() const
Verify the internal structure of an abstract_object is correct.
virtual abstract_object_pointert write(abstract_environmentt &environment, const namespacet &ns, const std::stack< exprt > &stack, const exprt &specifier, const abstract_object_pointert &value, bool merging_write) const
A helper function to evaluate writing to a component of an abstract object.
exprt to_predicate(const exprt &name) const
Converts to an invariant expression.
virtual abstract_object_pointert write_location_context(const locationt &location) const
Update the write location context for an abstract object.
virtual bool is_bottom() const
Find out if the abstract object is bottom.
abstract_object_pointert object
The Boolean constant true.
bool should_use_base_merge(const abstract_object_pointert &other) const
To detect the cases where the base merge is sufficient to do a merge We can't do if this->is_bottom()...
virtual exprt to_predicate_internal(const exprt &name) const
to_predicate implementation - derived classes will override
Clones the first parameter and merges it with the second.
virtual internal_abstract_object_pointert mutable_clone() const
virtual abstract_object_pointert abstract_object_merge_internal(const abstract_object_pointert &other) const
Helper function for abstract_objectt::abstract_object_merge to perform any additional actions after t...
typet t
To enforce copy-on-write these are private and have read-only accessors.
virtual abstract_object_pointert expression_transform(const exprt &expr, const std::vector< abstract_object_pointert > &operands, const abstract_environmentt &environment, const namespacet &ns) const
Interface for transforms.
abstract_objectt(const typet &type)
virtual abstract_object_pointert merge_location_context(const locationt &location) const
Update the merge location context for an abstract object.