Go to the documentation of this file.
18 const std::size_t _distance)
33 const std::size_t _upper,
34 const std::size_t _lower,
61 const std::size_t new_width = numeric_cast_v<std::size_t>(
power(2, bits));
63 const bool need_typecast =
64 new_width > x_width || x.
type().
id() != ID_unsignedbv;
70 for(std::size_t shift = 1; shift < new_width; shift <<= 1)
77 std::string bitstring;
78 bitstring.reserve(new_width);
79 for(std::size_t i = 0; i < new_width / (2 * shift); ++i)
80 bitstring += std::string(shift,
'0') + std::string(shift,
'1');
105 const std::size_t new_width = numeric_cast_v<std::size_t>(
power(2, bits));
107 const bool need_typecast =
108 new_width > x_width || x.
type().
id() != ID_unsignedbv;
114 for(std::size_t shift = 1; shift < new_width; shift <<= 1)
147 result_bits.reserve(int_width);
150 for(std::size_t i = 0; i < int_width; ++i)
159 if(
lhs().
type().
id() == ID_unsignedbv)
162 if(
rhs().
type().
id() == ID_unsignedbv)
165 std::size_t ssize = std::max(lhs_ssize, rhs_ssize) + 1;
178 if(
lhs().
type().
id() == ID_unsignedbv)
181 if(
rhs().
type().
id() == ID_unsignedbv)
184 std::size_t ssize = std::max(lhs_ssize, rhs_ssize) + 1;
197 if(
lhs().
type().
id() == ID_unsignedbv)
200 if(
rhs().
type().
id() == ID_unsignedbv)
203 std::size_t ssize = lhs_ssize + rhs_ssize;
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
static exprt conditional_cast(const exprt &expr, const typet &type)
shift_exprt(exprt _src, const irep_idt &_id, exprt _distance)
exprt lower() const
Lower a count_leading_zeros_exprt to arithmetic and logic expressions.
#define CHECK_RETURN(CONDITION)
The type of an expression, extends irept.
exprt lower() const
Lower a count_trailing_zeros_exprt to arithmetic and logic expressions.
exprt lower() const
Lower a plus_overflow_exprt to arithmetic and logic expressions.
exprt lower() const
Lower a popcount_exprt to arithmetic and logic expressions.
Unbounded, signed integers (mathematical integers, not bitvectors)
The plus expression Associativity is not specified.
Base class for all expressions.
A base class for binary expressions.
exprt lower() const
Lower a mult_overflow_exprt to arithmetic and logic expressions.
Concatenation of bit-vector operands.
exprt lower() const
Lower a find_first_set_exprt to arithmetic and logic expressions.
const bitvector_typet & to_bitvector_type(const typet &type)
Cast a typet to a bitvector_typet.
Expression to hold a symbol (variable)
Fixed-width bit-vector with unsigned binary interpretation.
typet & type()
Return the type of the expression.
A base class for expressions that are predicates, i.e., Boolean-typed, and that take exactly two argu...
#define PRECONDITION(CONDITION)
Fixed-width bit-vector with two's complement interpretation.
Binary multiplication Associativity is not specified.
const irep_idt & id() const
std::vector< exprt > operandst
std::size_t get_width() const
Bit-wise negation of bit-vectors.
const mp_integer binary2integer(const std::string &n, bool is_signed)
convert binary string representation to mp_integer
void add_to_operands(const exprt &expr)
Add the given argument to the end of exprt's operands.
exprt lower() const
Lower a bitreverse_exprt to arithmetic and logic expressions.
exprt lower() const
Lower a minus_overflow_exprt to arithmetic and logic expressions.
The popcount (counting the number of bits set to 1) expression.
Semantic type conversion.
A constant literal expression.
Base class for all expressions.
The count leading zeros (counting the number of zero bits starting from the most-significant bit) exp...