75 : bv_utils.sign_bit(
bv1);
97 !prop.
lequal(bv_utils.sign_bit(
bv0), bv_utils.sign_bit(bv));
120 ? std::optional<std::size_t>{bv0.size()}
130 if(
bv0.size() !=
bv1.size())
137 if(
bv0.size() !=
bv1.size())
154 "operands of overflow_mult expression shall have same type");
205 else if(expr.
operands().size() != 2)
242 for(std::size_t i = 0; i <
bv0.size(); i++)
285 for(std::size_t i = 0; i <
bv0.size(); i++)
288 bv.push_back(!carry);
API to expression classes for bitvectors.
Pre-defined bitvector types.
bool can_cast_type< signedbv_typet >(const typet &type)
Check whether a reference to a typet is a signedbv_typet.
static bvt shl_overflow_result(propt &prop, const bvt &bv0, const bvt &bv1, bv_utilst::representationt rep0, bv_utilst::representationt rep1)
static bvt mult_overflow_result(propt &prop, const bvt &bv0, const bvt &bv1, bv_utilst::representationt rep)
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
A Boolean expression returning true, iff operation kind would result in an overflow when applied to o...
virtual const bvt & convert_bv(const exprt &expr, const std::optional< std::size_t > expected_width={})
Convert expression to vector of literalts, using an internal cache to speed up conversion if availabl...
virtual literalt convert_binary_overflow(const binary_overflow_exprt &expr)
virtual bvt convert_overflow_result(const overflow_result_exprt &expr)
bvt conversion_failed(const exprt &expr)
Print that the expression of x has failed conversion, then return a vector of x's width.
virtual literalt convert_unary_overflow(const unary_overflow_exprt &expr)
virtual std::size_t boolbv_width(const typet &type) const
literalt is_int_min(const bvt &op)
static literalt sign_bit(const bvt &op)
bvt add(const bvt &op0, const bvt &op1)
literalt overflow_add(const bvt &op0, const bvt &op1, representationt rep)
literalt overflow_sub(const bvt &op0, const bvt &op1, representationt rep)
literalt overflow_negate(const bvt &op)
literalt full_adder(const literalt a, const literalt b, const literalt carry_in, literalt &carry_out)
bvt negate(const bvt &op)
typet & type()
Return the type of the expression.
const irep_idt & id() const
An expression returning both the result of the arithmetic operation under wrap-around semantics as we...
virtual literalt convert_rest(const exprt &expr)
virtual literalt land(literalt a, literalt b)=0
virtual literalt lselect(literalt a, literalt b, literalt c)=0
virtual literalt lxor(literalt a, literalt b)=0
virtual literalt lequal(literalt a, literalt b)=0
virtual literalt lor(literalt a, literalt b)=0
The type of an expression, extends irept.
A Boolean expression returning true, iff operation kind would result in an overflow when applied to t...
std::vector< literalt > bvt
literalt const_literal(bool value)
#define CHECK_RETURN(CONDITION)
#define UNREACHABLE
This should be used to mark dead code.
#define DATA_INVARIANT(CONDITION, REASON)
This condition should be used to document that assumptions that are made on goto_functions,...