12 #ifndef CPROVER_ANALYSES_VARIABLE_SENSITIVITY_ABSTRACT_VALUE_OBJECT_H
13 #define CPROVER_ANALYSES_VARIABLE_SENSITIVITY_ABSTRACT_VALUE_OBJECT_H
26 std::unique_ptr<index_range_implementationt>;
44 return range->current();
131 std::unique_ptr<value_range_implementationt>;
149 return range->current();
232 return std::make_unique<empty_value_ranget>();
282 const std::vector<abstract_object_pointert> &operands,
292 const std::stack<exprt> &stack,
293 const exprt &specifier,
295 bool merging_write)
const final;
abstract_objectt is the top of the inheritance heirarchy of objects used to represent individual vari...
std::shared_ptr< const T > sharing_ptrt
Merge is designed to allow different abstractions to be merged gracefully.
sharing_ptrt< class abstract_objectt > abstract_object_pointert
std::unique_ptr< index_range_implementationt > index_range_implementation_ptrt
sharing_ptrt< const abstract_value_objectt > abstract_value_pointert
index_range_implementation_ptrt make_indeterminate_index_range()
index_range_implementation_ptrt make_empty_index_range()
std::unique_ptr< value_range_implementationt > value_range_implementation_ptrt
value_range_implementation_ptrt make_single_value_range(const abstract_object_pointert &value)
virtual const typet & type() const
Get the real type of the variable this abstract object is representing.
virtual index_range_implementation_ptrt index_range_implementation(const namespacet &ns) const =0
abstract_value_objectt(const typet &type, bool tp, bool bttm)
virtual constant_interval_exprt to_interval() const =0
sharing_ptrt< const abstract_value_objectt > as_value(const abstract_object_pointert &obj) const
abstract_object_pointert merge(const abstract_object_pointert &other, const widen_modet &widen_mode) const final
Attempts to do a value/value merge if both are constants, otherwise falls back to the parent merge.
virtual abstract_object_pointert meet_with_value(const abstract_value_pointert &other) const =0
abstract_value_objectt(const exprt &expr, const abstract_environmentt &environment, const namespacet &ns)
virtual sharing_ptrt< const abstract_value_objectt > constrain(const exprt &lower, const exprt &upper) const =0
value_ranget value_range() const
abstract_object_pointert expression_transform(const exprt &expr, const std::vector< abstract_object_pointert > &operands, const abstract_environmentt &environment, const namespacet &ns) const final
Interface for transforms.
abstract_object_pointert meet(const abstract_object_pointert &other) const final
Base implementation of the meet operation: only used if no more precise abstraction can be used,...
virtual value_range_implementation_ptrt value_range_implementation() const =0
sharing_ptrt< const abstract_value_objectt > abstract_value_pointert
index_ranget index_range(const namespacet &ns) const
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 final
A helper function to evaluate writing to a component of an abstract object.
virtual abstract_object_pointert merge_with_value(const abstract_value_pointert &other, const widen_modet &widen_mode) const =0
Represents an interval of values.
const abstract_object_pointert & current() const override
bool advance_to_next() override
abstract_object_pointert nothing
value_range_implementation_ptrt reset() const override
Base class for all expressions.
virtual bool advance_to_next()=0
virtual ~index_range_implementationt()=default
virtual const exprt & current() const =0
virtual index_range_implementation_ptrt reset() const =0
bool operator==(const index_range_iteratort &other) const
index_range_implementation_ptrt range
~index_range_iteratort()=default
index_range_iteratort(index_range_iteratort &&rhs)
bool operator!=(const index_range_iteratort &other) const
index_range_iteratort(index_range_implementation_ptrt &&r)
const exprt & operator*() const
index_range_iteratort(const index_range_iteratort &)=delete
index_range_implementation_ptrt range
index_ranget(const index_ranget &)=delete
index_range_iteratort begin() const
index_ranget(index_ranget &&rhs)
index_ranget(index_range_implementation_ptrt r)
index_range_iteratort end() const
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
bool advance_to_next() override
single_value_index_ranget(const exprt &val)
const exprt & current() const override
The type of an expression, extends irept.
virtual ~value_range_implementationt()=default
virtual value_range_implementation_ptrt reset() const =0
virtual bool advance_to_next()=0
virtual const abstract_object_pointert & current() const =0
value_range_implementation_ptrt range
const abstract_object_pointert & operator*() const
value_range_iteratort(const value_range_iteratort &)=delete
value_range_iteratort(value_range_iteratort &&rhs)
value_range_iteratort(value_range_implementation_ptrt &&r)
bool operator==(const value_range_iteratort &other) const
bool operator!=(const value_range_iteratort &other) const
~value_range_iteratort()=default
value_range_implementation_ptrt range
value_ranget(const value_ranget &)=delete
value_ranget(value_ranget &&rhs)
value_range_iteratort begin() const
value_ranget(value_range_implementation_ptrt r)
abstract_object_pointert value_type
value_range_iteratort end() const