31 if(type_id==ID_pointer)
39 else if(type_id==ID_integer ||
45 else if(type_id==ID_unsignedbv)
50 else if(type_id==ID_signedbv)
55 else if(type_id==ID_c_bool)
60 else if(type_id==ID_c_enum)
63 if(subtype.
id()==ID_signedbv)
68 else if(subtype.
id()==ID_unsignedbv)
74 else if(type_id==ID_c_bit_field)
77 if(subtype.
id()==ID_signedbv)
82 else if(subtype.
id()==ID_unsignedbv)
115 if(type_id==ID_integer)
121 else if(type_id==ID_natural)
133 else if(type_id==ID_unsignedbv)
140 else if(type_id==ID_bv)
147 else if(type_id==ID_signedbv)
154 else if(type_id==ID_c_enum)
161 else if(type_id==ID_c_bool)
168 else if(type_id==ID_bool)
172 else if(int_value==1)
175 else if(type_id==ID_pointer)
180 else if(type_id==ID_c_bit_field)
187 else if(type_id==ID_fixedbv)
194 else if(type_id==ID_floatbv)
214 for(result=1; x<size; result+=1, x*=2) {}
231 if(base.is_long() && exponent.is_long())
233 switch(base.to_long())
238 result.setPower2(exponent.to_ulong());
255 if(exponent.is_odd())
The type of an expression.
const std::string & id2string(const irep_idt &d)
const mp_integer string2integer(const std::string &n, unsigned base)
const std::string integer2string(const mp_integer &n, unsigned base)
constant_exprt to_expr() const
const irep_idt & get_value() const
The null pointer constant.
const mp_integer binary2integer(const std::string &n, bool is_signed)
convert binary string representation to mp_integer
A constant literal expression.
const floatbv_typet & to_floatbv_type(const typet &type)
Cast a generic typet to a floatbv_typet.
const irep_idt & id() const
void set_value(const irep_idt &value)
const c_bool_typet & to_c_bool_type(const typet &type)
Cast a generic typet to a c_bool_typet.
const c_enum_typet & to_c_enum_type(const typet &type)
Cast a generic typet to a c_enum_typet.
The boolean constant true.
void from_integer(const mp_integer &i)
API to expression classes.
const c_bit_field_typet & to_c_bit_field_type(const typet &type)
Cast a generic typet to a c_bit_field_typet.
const unsignedbv_typet & to_unsignedbv_type(const typet &type)
Cast a generic typet to an unsignedbv_typet.
constant_exprt to_expr() const
The boolean constant false.
std::size_t get_width() const
const bv_typet & to_bv_type(const typet &type)
Cast a generic typet to a bv_typet.
unsigned integer2unsigned(const mp_integer &n)
const pointer_typet & to_pointer_type(const typet &type)
Cast a generic typet to a pointer_typet.
const fixedbv_typet & to_fixedbv_type(const typet &type)
Cast a generic typet to a fixedbv_typet.
Base class for all expressions.
const signedbv_typet & to_signedbv_type(const typet &type)
Cast a generic typet to a signedbv_typet.
const std::string integer2binary(const mp_integer &n, std::size_t width)
void from_integer(const mp_integer &i)
unsigned int get_unsigned_int(const irep_namet &name) const
const constant_exprt & to_constant_expr(const exprt &expr)
Cast a generic exprt to a constant_exprt.
const typet & subtype() const