Go to the documentation of this file.
10 #ifndef CPROVER_UTIL_SIMPLIFY_EXPR_CLASS_H
11 #define CPROVER_UTIL_SIMPLIFY_EXPR_CLASS_H
14 #ifdef DEBUG_ON_DEMAND
25 #ifdef USE_LOCAL_REPLACE_MAP
85 #ifdef DEBUG_ON_DEMAND
89 #ifdef DEBUG_ON_DEMAND
91 debug_on=stat(
"SIMP_DEBUG", &f)==0;
101 template <
typename T = exprt>
233 exprt &expr,
const exprt &cond,
bool truth,
bool &new_truth);
260 return type.
id()==ID_unsignedbv ||
261 type.
id()==ID_signedbv ||
267 #ifdef DEBUG_ON_DEMAND
270 #ifdef USE_LOCAL_REPLACE_MAP
276 #endif // CPROVER_UTIL_SIMPLIFY_EXPR_CLASS_H
Operator to update elements in structs and arrays.
virtual ~simplify_exprt()
resultt simplify_rec(const exprt &)
resultt simplify_object_size(const object_size_exprt &)
bool simplify_if_recursive(exprt &expr, const exprt &cond, bool truth)
resultt simplify_is_invalid_pointer(const unary_exprt &)
resultt simplify_isnormal(const unary_exprt &)
bool simplify_if_disj(exprt &expr, const exprt &cond)
A base class for multi-ary expressions Associativity is not specified.
resultt simplify_shifts(const shift_exprt &)
resultt simplify_dereference(const dereference_exprt &)
resultt simplify_concatenation(const concatenation_exprt &)
resultt simplify_pointer_offset(const pointer_offset_exprt &)
Expression corresponding to op() where the bytes starting at position offset (given in number of byte...
The count trailing zeros (counting the number of zero bits starting from the least-significant bit) e...
resultt simplify_address_of(const address_of_exprt &)
resultt
The result of goto verifying.
resultt simplify_unary_plus(const unary_plus_exprt &)
resultt simplify_bitwise(const multi_ary_exprt &)
bool simplify_if_preorder(if_exprt &expr)
resultt simplify_bitnot(const bitnot_exprt &)
The type of an expression, extends irept.
resultt simplify_overflow_binary(const binary_overflow_exprt &)
Try to simplify overflow-+, overflow-*, overflow–, overflow-shl.
Operator to dereference a pointer.
simplify_exprt(const namespacet &_ns)
The trinary if-then-else operator.
resultt simplify_popcount(const popcount_exprt &)
resultt simplify_inequality_address_of(const binary_relation_exprt &)
virtual bool simplify(exprt &expr)
resultt simplify_is_dynamic_object(const unary_exprt &)
bool simplify_if_conj(exprt &expr, const exprt &cond)
resultt simplify_clz(const count_leading_zeros_exprt &)
Try to simplify count-leading-zeros to a constant expression.
resultt simplify_update(const update_exprt &)
The plus expression Associativity is not specified.
resultt simplify_boolean(const exprt &)
resultt simplify_overflow_unary(const unary_overflow_exprt &)
Try to simplify overflow-unary-.
Base class for all expressions.
bool simplify_if_cond(exprt &expr)
resultt simplify_ctz(const count_trailing_zeros_exprt &)
Try to simplify count-trailing-zeros to a constant expression.
Generic base class for unary expressions.
resultt simplify_extractbit(const extractbit_exprt &)
A base class for binary expressions.
An expression returning both the result of the arithmetic operation under wrap-around semantics as we...
Sign of an expression Predicate is true if _op is negative, false otherwise.
Concatenation of bit-vector operands.
resultt simplify_complex(const unary_exprt &)
resultt simplify_plus(const plus_exprt &)
Expression for finding the size (in bytes) of the object a pointer points to.
resultt simplify_byte_extract(const byte_extract_exprt &)
resultt simplify_not(const not_exprt &)
resultt simplify_inequality_both_constant(const binary_relation_exprt &)
simplifies inequalities for the case in which both sides of the inequality are constants
static resultt unchanged(exprt expr)
resultt simplify_node(exprt)
resultt simplify_if(const if_exprt &)
A namespacet is essentially one or two symbol tables bound together, to allow for symbol lookups in t...
resultt simplify_minus(const minus_exprt &)
resultt simplify_power(const binary_exprt &)
resultt simplify_div(const div_exprt &)
resultt simplify_inequality_no_constant(const binary_relation_exprt &)
resultt simplify_typecast(const typecast_exprt &)
resultt simplify_bitreverse(const bitreverse_exprt &)
Try to simplify bit-reversing to a constant expression.
resultt simplify_mod(const mod_exprt &)
Semantic type conversion from/to floating-point formats.
resultt simplify_isnan(const unary_exprt &)
A Boolean expression returning true, iff operation kind would result in an overflow when applied to o...
static resultt changed(resultt<> result)
static bool is_bitvector_type(const typet &type)
resultt simplify_inequality_rhs_is_constant(const binary_relation_exprt &)
resultt simplify_bswap(const bswap_exprt &)
bool simplify_node_preorder(exprt &expr)
enum simplify_exprt::resultt::expr_changedt expr_changed
Application of (mathematical) function.
Binary multiplication Associativity is not specified.
resultt simplify_inequality(const binary_relation_exprt &)
simplifies inequalities !=, <=, <, >=, >, and also ==
A numerical identifier for the object a pointer points to.
The unary minus expression.
resultt simplify_good_pointer(const unary_exprt &)
const irep_idt & id() const
The unary plus expression.
resultt simplify_mult(const mult_exprt &)
resultt simplify_with(const with_exprt &)
resultt(expr_changedt _expr_changed, T _expr)
resultt simplify_unary_minus(const unary_minus_exprt &)
resultt simplify_function_application(const function_application_exprt &)
Attempt to simplify mathematical function applications if we have enough information to do so.
resultt simplify_pointer_object(const pointer_object_exprt &)
Operator to update elements in structs and arrays.
bool simplify_if_branch(exprt &trueexpr, exprt &falseexpr, const exprt &cond)
resultt simplify_index(const index_exprt &)
resultt(T _expr)
conversion from expression, thus not 'explicit' marks the expression as "CHANGED"
Bit-wise negation of bit-vectors.
Extract member of struct or union.
resultt simplify_member(const member_exprt &)
A Boolean expression returning true, iff operation kind would result in an overflow when applied to t...
A base class for shift and rotate operators.
resultt simplify_object(const exprt &)
resultt simplify_inequality_pointer_object(const binary_relation_exprt &)
The offset (in bytes) of a pointer relative to the object.
A (mathematical) lambda expression.
resultt simplify_sign(const sign_exprt &)
std::unordered_map< exprt, exprt, irep_hash > replace_mapt
A base class for relations, i.e., binary predicates whose two operands have the same type.
resultt simplify_lambda(const lambda_exprt &)
bool simplify_if_implies(exprt &expr, const exprt &cond, bool truth, bool &new_truth)
resultt simplify_extractbits(const extractbits_exprt &)
Simplifies extracting of bits from a constant.
IEEE floating-point operations These have two data operands (op0 and op1) and one rounding mode (op2)...
The byte swap expression.
resultt simplify_address_of_arg(const exprt &)
Returns one plus the index of the least-significant one bit, or zero if the operand is zero.
resultt simplify_byte_update(const byte_update_exprt &)
Operator to return the address of an object.
The popcount (counting the number of bits set to 1) expression.
Semantic type conversion.
resultt simplify_abs(const abs_exprt &)
Array constructor from list of elements.
resultt simplify_ieee_float_relation(const binary_relation_exprt &)
resultt simplify_ffs(const find_first_set_exprt &)
Try to simplify find-first-set to a constant expression.
resultt simplify_floatbv_typecast(const floatbv_typecast_exprt &)
Modulo defined as lhs-(rhs * truncate(lhs/rhs)).
The count leading zeros (counting the number of zero bits starting from the most-significant bit) exp...
resultt simplify_floatbv_op(const ieee_float_op_exprt &)
resultt simplify_overflow_result(const overflow_result_exprt &)
Try to simplify overflow_result-+, overflow_result-*, overflow_result–, overflow_result-shl,...
Reverse the order of bits in a bit-vector.
resultt simplify_isinf(const unary_exprt &)