37 return std::make_unique<constant_index_ranget>(val);
113 auto other_expr = other->to_constant();
114 if(
is_bottom() && other_expr.is_constant())
115 return std::make_shared<constant_abstract_valuet>(other_expr);
117 if(
value == other_expr)
118 return shared_from_this();
127 auto other_interval = other->to_interval();
129 if(other_interval.contains(value_as_interval))
130 return shared_from_this();
137 const exprt &upper)
const
std::set< abstract_object_pointert > abstract_object_visitedt
sharing_ptrt< class abstract_objectt > abstract_object_pointert
Statistics gathering for the variable senstivity domain.
index_range_implementation_ptrt make_indeterminate_index_range()
value_range_implementation_ptrt make_single_value_range(const abstract_object_pointert &value)
std::unique_ptr< index_range_implementationt > index_range_implementation_ptrt
std::unique_ptr< value_range_implementationt > value_range_implementation_ptrt
virtual exprt to_constant() const
Converts to a constant expression if possible.
virtual bool is_top() const
Find out if the abstract object is top.
virtual bool is_bottom() const
Find out if the abstract object is bottom.
static combine_result merge(const abstract_object_pointert &op1, const abstract_object_pointert &op2, const locationt &merge_location, const widen_modet &widen_mode)
virtual void output(std::ostream &out, const class ai_baset &ai, const namespacet &ns) const
Print the value of the abstract object.
static combine_result meet(const abstract_object_pointert &op1, const abstract_object_pointert &op2)
Interface method for the meet operation.
virtual void get_statistics(abstract_object_statisticst &statistics, abstract_object_visitedt &visited, const abstract_environmentt &env, const namespacet &ns) const
sharing_ptrt< const abstract_value_objectt > as_value(const abstract_object_pointert &obj) const
sharing_ptrt< const abstract_value_objectt > abstract_value_pointert
This is the basic interface of the abstract interpreter with default implementations of the core func...
void output(std::ostream &out, const class ai_baset &ai, const class namespacet &ns) const override
void get_statistics(abstract_object_statisticst &statistics, abstract_object_visitedt &visited, const abstract_environmentt &env, const namespacet &ns) const override
value_range_implementation_ptrt value_range_implementation() const override
constant_abstract_valuet(const exprt &t)
constant_interval_exprt to_interval() const override
index_range_implementation_ptrt index_range_implementation(const namespacet &ns) const override
abstract_value_pointert constrain(const exprt &lower, const exprt &upper) const override
internal_abstract_object_pointert mutable_clone() const override
exprt to_constant() const override
Converts to a constant expression if possible.
exprt to_predicate_internal(const exprt &name) const override
to_predicate implementation - derived classes will override
abstract_object_pointert merge_with_value(const abstract_value_pointert &other, const widen_modet &widen_mode) const override
Merges another abstract value into this one.
abstract_object_pointert meet_with_value(const abstract_value_pointert &other) const override
index_range_implementation_ptrt reset() const override
constant_index_ranget(const exprt &val)
Represents an interval of values.
Base class for all expressions.
bool is_constant() const
Return whether the expression is a constant.
static memory_sizet from_bytes(std::size_t bytes)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The type of an expression, extends irept.
static index_range_implementation_ptrt make_constant_index_range(const exprt &val)
An abstraction of a single value that just stores a constant.
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
API to expression classes.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
std::size_t number_of_constants
memory_sizet objects_memory_usage
An underestimation of the memory usage of the abstract objects.