74 return std::make_unique<interval_index_ranget>(
interval,
n);
180 if(relation ==
ID_le)
182 if(relation ==
ID_ge)
184 if(relation ==
ID_lt)
186 if(relation ==
ID_gt)
199 const auto &relation = e.
id();
306 return std::hash<std::string>{}(
interval.pretty());
313 std::dynamic_pointer_cast<const interval_abstract_valuet>(other);
334 interval.get_lower().is_constant(),
"We only support constant limits");
346 interval.get_upper().is_constant(),
"We only support constant limits");
375 if(other->is_bottom())
443 const exprt &upper)
const
460 if(
interval.is_single_value_interval())
466 return and_exprt(lower_bound, upper_bound);
477 if(
interval.is_single_value_interval())
An abstract version of a program environment.
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_empty_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
Pre-defined bitvector types.
const unsignedbv_typet & to_unsignedbv_type(const typet &type)
Cast a typet to an unsignedbv_typet.
const signedbv_typet & to_signedbv_type(const typet &type)
Cast a typet to a signedbv_typet.
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.
virtual void output(std::ostream &out, const class ai_baset &ai, const namespacet &ns) const
Print the value of the abstract object.
virtual void get_statistics(abstract_object_statisticst &statistics, abstract_object_visitedt &visited, const abstract_environmentt &env, const namespacet &ns) const
virtual const typet & type() const
Get the real type of the variable this abstract object is representing.
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...
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A base class for expressions that are predicates, i.e., Boolean-typed, and that take exactly two argu...
A base class for relations, i.e., binary predicates whose two operands have the same type.
Represents an interval of values.
constant_interval_exprt bottom() const
tvt greater_than(const constant_interval_exprt &o) const
tvt less_than_or_equal(const constant_interval_exprt &o) const
static bool is_top(const constant_interval_exprt &a)
static exprt get_max(const exprt &a, const exprt &b)
static exprt get_min(const exprt &a, const exprt &b)
const exprt & get_lower() const
const exprt & get_upper() const
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Base class for all expressions.
bool is_true() const
Return whether the expression is a constant representing true.
bool is_constant() const
Return whether the expression is a constant.
typet & type()
Return the type of the expression.
abstract_object_pointert merge_with_value(const abstract_value_pointert &other, const widen_modet &widen_mode) const override
Merge another interval abstract object with this one.
static std::shared_ptr< interval_abstract_valuet > make_interval(Args &&... args)
interval_abstract_valuet(const typet &t, bool tp, bool bttm)
internal_abstract_object_pointert mutable_clone() const override
bool internal_equality(const abstract_object_pointert &other) const override
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
index_range_implementation_ptrt index_range_implementation(const namespacet &ns) const override
exprt to_constant() const override
Converts to a constant expression if possible.
abstract_value_pointert constrain(const exprt &lower, const exprt &upper) const override
exprt to_predicate_internal(const exprt &name) const override
to_predicate implementation - derived classes will override
abstract_object_pointert meet_with_value(const abstract_value_pointert &other) const override
Meet another interval abstract object with this one.
value_range_implementation_ptrt value_range_implementation() const override
void set_top_internal() override
size_t internal_hash() const override
constant_interval_exprt interval
const exprt & current() const override
index_range_implementation_ptrt reset() const override
static exprt next_element(const exprt &cur, const namespacet &ns)
interval_index_ranget(const constant_interval_exprt &interval_, const namespacet &n)
const constant_interval_exprt & interval
bool advance_to_next() override
const irep_idt & id() const
+∞ upper bound for intervals
static memory_sizet from_bytes(std::size_t bytes)
-∞ upper bound for intervals
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
The plus expression Associativity is not specified.
The type of an expression, extends irept.
const exprt & skip_typecast(const exprt &expr)
find the expression nested inside typecasts, if any
Deprecated expression utility functions.
const constant_interval_exprt & to_constant_interval_expr(const exprt &expr)
bool new_interval_is_top(const constant_interval_exprt &e)
static constant_interval_exprt interval_from_relation(const exprt &e)
Builds an interval representing all values satisfying the input expression.
static bool represents_interval(const exprt &expr)
static bool bvint_value_is_min(const typet &type, const mp_integer &value)
static mp_integer force_value_from_expr(const exprt &value)
abstract_object_pointert widening_merge(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static index_range_implementation_ptrt make_interval_index_range(const constant_interval_exprt &interval, const namespacet &n)
static constant_interval_exprt interval_from_x_gt_value(const exprt &value)
static constant_interval_exprt make_interval_expr(const exprt &expr)
static bool bvint_value_is_max(const typet &type, const mp_integer &value)
static irep_idt invert_relation(const irep_idt &relation)
static constant_interval_exprt interval_from_x_ge_value(const exprt &value)
static constant_interval_exprt interval_from_x_lt_value(const exprt &value)
static constant_interval_exprt interval_from_x_le_value(const exprt &value)
An interval to represent a set of possible values.
const std::string & id2string(const irep_idt &d)
exprt simplify_expr(exprt src, const namespacet &ns)
#define PRECONDITION(CONDITION)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.
const binary_exprt & to_binary_expr(const exprt &expr)
Cast an exprt to a binary_exprt.
const constant_exprt & to_constant_expr(const exprt &expr)
Cast an exprt to a constant_exprt.
memory_sizet objects_memory_usage
An underestimation of the memory usage of the abstract objects.
std::size_t number_of_single_value_intervals
std::size_t number_of_interval_abstract_objects