Go to the documentation of this file.
37 return util_make_unique<constant_index_ranget>(val);
118 auto other_expr = other->to_constant();
119 if(
is_bottom() && other_expr.is_constant())
120 return std::make_shared<constant_abstract_valuet>(other_expr);
122 if(
value == other_expr)
123 return shared_from_this();
132 auto other_interval = other->to_interval();
134 if(other_interval.contains(value_as_interval))
135 return shared_from_this();
142 const exprt &upper)
const
sharing_ptrt< class abstract_objectt > abstract_object_pointert
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.
exprt to_constant() const override
Converts to a constant expression if possible.
The type of an expression, extends irept.
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.
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
Represents an interval of values.
std::unique_ptr< value_range_implementationt > value_range_implementation_ptrt
abstract_value_pointert constrain(const exprt &lower, const exprt &upper) const override
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
value_range_implementation_ptrt value_range_implementation() const override
exprt to_predicate_internal(const exprt &name) const override
to_predicate implementation - derived classes will override
static combine_result merge(const abstract_object_pointert &op1, const abstract_object_pointert &op2, const locationt &merge_location, const widen_modet &widen_mode)
void output(std::ostream &out, const class ai_baset &ai, const class namespacet &ns) const override
virtual exprt to_constant() const
Converts to a constant expression if possible.
sharing_ptrt< const abstract_value_objectt > as_value(const abstract_object_pointert &obj) const
std::set< abstract_object_pointert > abstract_object_visitedt
constant_abstract_valuet(const typet &t)
constant_index_ranget(const exprt &val)
static combine_result meet(const abstract_object_pointert &op1, const abstract_object_pointert &op2)
Interface method for the meet operation.
value_range_implementation_ptrt make_single_value_range(const abstract_object_pointert &value)
bool is_constant() const
Return whether the expression is a constant.
memory_sizet objects_memory_usage
An underestimation of the memory usage of the abstract objects.
This is the basic interface of the abstract interpreter with default implementations of the core func...
std::size_t number_of_constants
static index_range_implementation_ptrt make_constant_index_range(const exprt &val)
void get_statistics(abstract_object_statisticst &statistics, abstract_object_visitedt &visited, const abstract_environmentt &env, const namespacet &ns) const override
std::unique_ptr< index_range_implementationt > index_range_implementation_ptrt
abstract_object_pointert meet_with_value(const abstract_value_pointert &other) const override
sharing_ptrt< const abstract_value_objectt > abstract_value_pointert
index_range_implementation_ptrt reset() const override
virtual bool is_bottom() const
Find out if the abstract object is bottom.
constant_interval_exprt to_interval() const override
static memory_sizet from_bytes(std::size_t bytes)
internal_abstract_object_pointert mutable_clone() const override
std::string from_expr(const namespacet &ns, const irep_idt &identifier, const exprt &expr)
index_range_implementation_ptrt make_indeterminate_index_range()
index_range_implementation_ptrt index_range_implementation(const namespacet &ns) const override
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.