8 #ifndef CPROVER_UTIL_INTERVAL_H
9 #define CPROVER_UTIL_INTERVAL_H
110 b &= expr.
is_constant() ||
id == ID_min_value ||
id == ID_max_value;
259 friend std::ostream &
441 std::vector<exprt> &collection);
445 std::vector<exprt> &collection);
448 std::vector<exprt> &collection);
452 std::vector<exprt> &collection);
A base class for binary expressions.
A constant literal expression.
Represents an interval of values.
static constant_interval_exprt get_extremes(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs, const irep_idt &operation)
constant_interval_exprt(exprt lower, exprt upper, typet type)
max_value_exprt max() const
friend const constant_interval_exprt operator<<(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static exprt generate_division_expression(const exprt &lhs, const exprt &rhs)
constant_interval_exprt bottom() const
constant_interval_exprt minus(const constant_interval_exprt &other) const
tvt greater_than_or_equal(const constant_interval_exprt &o) const
min_value_exprt min() const
friend const constant_interval_exprt operator/(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
constant_interval_exprt(const typet &type)
tvt greater_than(const constant_interval_exprt &o) const
constant_interval_exprt bitwise_or(const constant_interval_exprt &o) const
constant_interval_exprt decrement() const
tvt less_than_or_equal(const constant_interval_exprt &o) const
friend bool operator<=(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
tvt is_definitely_false() const
constant_interval_exprt left_shift(const constant_interval_exprt &o) const
friend const constant_interval_exprt operator%(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
tvt not_equal(const constant_interval_exprt &o) const
static exprt generate_shift_expression(const exprt &lhs, const exprt &rhs, const irep_idt &operation)
friend const constant_interval_exprt operator>>(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
friend bool operator==(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
bool has_no_upper_bound() const
friend bool operator<(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
constant_interval_exprt typecast(const typet &type) const
constant_interval_exprt multiply(const constant_interval_exprt &o) const
static constant_interval_exprt tvt_to_interval(const tvt &val)
constant_interval_exprt unary_plus() const
constant_interval_exprt plus(const constant_interval_exprt &o) const
static exprt get_extreme(std::vector< exprt > values, bool min=true)
static void append_multiply_expression(const exprt &lower, const exprt &upper, std::vector< exprt > &collection)
Adds all possible values that may arise from multiplication (more than one, in case of past the type ...
constant_interval_exprt bitwise_xor(const constant_interval_exprt &o) const
bool is_single_value_interval() const
constant_interval_exprt increment() const
bool is_bitvector() const
std::string to_string() const
bool contains(const constant_interval_exprt &interval) const
friend const constant_interval_exprt operator&(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
bool is_well_formed() const
friend bool operator>(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static bool is_extreme(const exprt &expr)
tvt logical_or(const constant_interval_exprt &o) const
static constant_interval_exprt singleton(const exprt &x)
static exprt simplified_expr(exprt expr)
bool contains_zero() const
constant_interval_exprt handle_constant_unary_expression(const irep_idt &op) const
SET OF ARITHMETIC OPERATORS.
friend const constant_interval_exprt operator+(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
friend bool operator!=(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static bool is_valid_bound(const exprt &expr)
constant_interval_exprt modulo(const constant_interval_exprt &o) const
static exprt get_max(const exprt &a, const exprt &b)
bool has_no_lower_bound() const
static exprt get_min(const exprt &a, const exprt &b)
static bool is_max(const constant_interval_exprt &a)
constant_interval_exprt(const exprt &lower, const exprt &upper)
friend const constant_interval_exprt operator-(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static void generate_expression(const exprt &lhs, const exprt &rhs, const irep_idt &operation, std::vector< exprt > &collection)
constant_interval_exprt eval(const irep_idt &unary_operator) const
tvt is_definitely_true() const
static bool is_min(const constant_interval_exprt &a)
friend const constant_interval_exprt operator*(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
static exprt generate_modulo_expression(const exprt &lhs, const exprt &rhs)
tvt logical_xor(const constant_interval_exprt &o) const
friend const constant_interval_exprt operator^(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
const exprt & get_lower() const
static void append_multiply_expression_min(const exprt &min, const exprt &other, std::vector< exprt > &collection)
Appends interval bounds that could arise from MIN * other.
constant_interval_exprt right_shift(const constant_interval_exprt &o) const
tvt logical_and(const constant_interval_exprt &o) const
static void append_multiply_expression_max(const exprt &expr, std::vector< exprt > &collection)
Appends interval bounds that could arise from MAX * expr.
constant_interval_exprt bitwise_and(const constant_interval_exprt &o) const
constant_interval_exprt top() const
static bool contains_extreme(const exprt expr)
constant_interval_exprt unary_minus() const
constant_exprt zero() const
tvt less_than(const constant_interval_exprt &o) const
static exprt abs(const exprt &expr)
friend const constant_interval_exprt operator|(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
constant_interval_exprt bitwise_not() const
constant_interval_exprt divide(const constant_interval_exprt &o) const
static constant_interval_exprt simplified_interval(exprt &l, exprt &r)
constant_interval_exprt handle_constant_binary_expression(const constant_interval_exprt &other, const irep_idt &) const
const exprt & get_upper() const
friend bool operator>=(const constant_interval_exprt &lhs, const constant_interval_exprt &rhs)
tvt equal(const constant_interval_exprt &o) const
friend const constant_interval_exprt operator!(const constant_interval_exprt &lhs)
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_boolean() const
Return whether the expression represents a Boolean.
bool is_false() const
Return whether the expression is a constant representing false.
typet & type()
Return the type of the expression.
bool is_constant() const
Return whether the expression is a constant.
The Boolean constant false.
const irep_idt & id() const
+∞ upper bound for intervals
max_value_exprt(const typet &_type)
max_value_exprt(const exprt &_expr)
-∞ upper bound for intervals
min_value_exprt(const typet &_type)
min_value_exprt(const exprt &_expr)
An expression without operands.
The Boolean constant true.
The type of an expression, extends irept.
const constant_interval_exprt & to_constant_interval_expr(const exprt &expr)
#define PRECONDITION(CONDITION)
API to expression classes.