33 const bool need_typecast =
34 new_width > x_width || x.
type().
id() != ID_unsignedbv;
39 for(std::size_t shift = 1; shift < new_width; shift <<= 1)
46 std::string bitstring;
47 bitstring.reserve(new_width);
48 for(std::size_t i = 0; i < new_width / (2 * shift); ++i)
49 bitstring += std::string(shift,
'0') + std::string(shift,
'1');
Fixed-width bit-vector with unsigned binary interpretation.
mp_integer pointer_offset_bits(const typet &type, const namespacet &ns)
A constant literal expression.
#define CHECK_RETURN(CONDITION)
exprt lower_popcount(const popcount_exprt &expr, const namespacet &ns)
Lower a popcount_exprt to arithmetic and logic expressions.
const irep_idt & id() const
API to expression classes.
The popcount (counting the number of bits set to 1) expression.
Base class for all expressions.
std::size_t integer2size_t(const mp_integer &n)
void make_typecast(const typet &_type)