Go to the documentation of this file.
31 if(type.
id()==ID_merged_type)
36 else if(type.
id()==ID_signed)
38 else if(type.
id()==ID_unsigned)
40 else if(type.
id()==ID_ptr32)
42 else if(type.
id()==ID_ptr64)
44 else if(type.
id()==ID_volatile)
46 else if(type.
id()==ID_asm)
51 !type_with_subtypes.subtypes().empty() &&
52 type_with_subtypes.subtypes()[0].id() == ID_string_constant)
63 else if(type.
id()==ID_const)
65 else if(type.
id()==ID_restrict)
67 else if(type.
id()==ID_atomic)
69 else if(type.
id()==ID_atomic_type_specifier)
75 else if(type.
id()==ID_char)
77 else if(type.
id()==ID_int)
79 else if(type.
id()==ID_int8)
81 else if(type.
id()==ID_int16)
83 else if(type.
id()==ID_int32)
85 else if(type.
id()==ID_int64)
87 else if(type.
id()==ID_gcc_float16)
89 else if(type.
id()==ID_gcc_float32)
91 else if(type.
id()==ID_gcc_float32x)
93 else if(type.
id()==ID_gcc_float64)
95 else if(type.
id()==ID_gcc_float64x)
97 else if(type.
id()==ID_gcc_float128)
99 else if(type.
id()==ID_gcc_float128x)
101 else if(type.
id()==ID_gcc_int128)
103 else if(type.
id()==ID_gcc_attribute_mode)
107 else if(type.
id()==ID_msc_based)
109 const exprt &as_expr=
110 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
113 else if(type.
id()==ID_custom_bv)
116 const exprt &size_expr=
117 static_cast<const exprt &
>(type.
find(ID_size));
121 else if(type.
id()==ID_custom_floatbv)
125 const exprt &size_expr=
126 static_cast<const exprt &
>(type.
find(ID_size));
127 const exprt &fsize_expr=
128 static_cast<const exprt &
>(type.
find(ID_f));
133 else if(type.
id()==ID_custom_fixedbv)
137 const exprt &size_expr=
138 static_cast<const exprt &
>(type.
find(ID_size));
139 const exprt &fsize_expr=
140 static_cast<const exprt &
>(type.
find(ID_f));
145 else if(type.
id()==ID_short)
147 else if(type.
id()==ID_long)
149 else if(type.
id()==ID_double)
151 else if(type.
id()==ID_float)
153 else if(type.
id()==ID_c_bool)
155 else if(type.
id()==ID_proper_bool)
157 else if(type.
id()==ID_complex)
159 else if(type.
id()==ID_static)
161 else if(type.
id()==ID_thread_local)
163 else if(type.
id()==ID_inline)
165 else if(type.
id()==ID_extern)
167 else if(type.
id()==ID_typedef)
169 else if(type.
id()==ID_register)
171 else if(type.
id()==ID_weak)
173 else if(type.
id() == ID_used)
175 else if(type.
id()==ID_auto)
179 else if(type.
id()==ID_packed)
181 else if(type.
id()==ID_aligned)
191 else if(type.
id()==ID_transparent_union)
195 else if(type.
id() == ID_frontend_vector)
200 else if(type.
id()==ID_void)
205 other.push_back(tmp);
207 else if(type.
id()==ID_msc_declspec)
209 const exprt &as_expr=
210 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
215 const irep_idt &
id=it->get(ID_identifier);
226 else if(type.
id()==ID_noreturn)
228 else if(type.
id()==ID_constructor)
230 else if(type.
id()==ID_destructor)
239 else if(type.
id()==ID_frontend_pointer)
247 const irep_idt typedef_identifier=type.
get(ID_C_typedef);
248 if(!typedef_identifier.
empty())
249 tmp.
set(ID_C_typedef, typedef_identifier);
250 other.push_back(tmp);
252 else if(type.
id()==ID_pointer)
256 else if(type.
id() == ID_C_spec_requires)
258 const exprt &as_expr =
259 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
262 else if(type.
id() == ID_C_spec_requires_contract)
264 const exprt &as_expr =
265 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
268 else if(type.
id() == ID_C_spec_assigns)
270 const exprt &as_expr =
271 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
276 else if(type.
id() == ID_C_spec_ensures)
278 const exprt &as_expr =
279 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
282 else if(type.
id() == ID_C_spec_ensures_contract)
284 const exprt &as_expr =
285 static_cast<const exprt &
>(
static_cast<const irept &
>(type));
289 other.push_back(type);
311 error() <<
"illegal type modifier for defined type" <<
eom;
318 if(
other.front().id()==ID_asm &&
other.back().id()==ID_empty)
320 else if(
other.front().id()==ID_empty &&
other.back().id()==ID_asm)
327 error() <<
"illegal combination of defined types" <<
eom;
356 error() <<
"combining constructor and destructor not supported"
362 if(type.
id()==ID_code)
365 else if(type_p->
id()!=ID_empty)
368 error() <<
"constructor and destructor required to be type void, "
379 error() <<
"constructor and destructor required to be type void, "
394 error() <<
"cannot combine integer type with floating-point type" <<
eom;
405 error() <<
"conflicting type modifiers" <<
eom;
435 error() <<
"cannot combine integer type with floating-point type" <<
eom;
442 error() <<
"conflicting type modifiers" <<
eom;
460 error() <<
"conflicting type modifiers" <<
eom;
467 error() <<
"illegal type modifier for float" <<
eom;
479 error() <<
"illegal type modifier for C boolean type" <<
eom;
493 error() <<
"illegal type modifier for proper boolean type" <<
eom;
512 error() <<
"illegal type modifier for char type" <<
eom;
519 error() <<
"conflicting type modifiers" <<
eom;
538 error() <<
"conflicting type modifiers" <<
eom;
551 error() <<
"conflicting type modifiers" <<
eom;
588 type.
id(
is_signed?ID_custom_signedbv:ID_custom_unsignedbv);
593 type.
id(ID_custom_floatbv);
599 type.
id(ID_custom_fixedbv);
608 error() <<
"conflicting type modifiers" <<
eom;
641 error() <<
"illegal type modifier for integer type" <<
eom;
683 type.
set(ID_C_packed,
true);
#define UNREACHABLE
This should be used to mark dead code.
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
const code_with_contract_typet & to_code_with_contract_type(const typet &type)
Cast a typet to a code_with_contract_typet.
const unary_exprt & to_unary_expr(const exprt &expr)
Cast an exprt to a unary_exprt.
floatbv_typet gcc_float32_type()
virtual void set_attributes(typet &type) const
Add qualifiers and GCC attributes onto type.
floatbv_typet gcc_float64x_type()
signedbv_typet signed_long_long_int_type()
signedbv_typet signed_char_type()
The type of an expression, extends irept.
floatbv_typet gcc_float16_type()
std::string pretty(unsigned indent=0, unsigned max_indent=0) const
const irept & find(const irep_idt &name) const
floatbv_typet long_double_type()
unsigned gcc_float32x_cnt
virtual void write(typet &type)
source_locationt source_location
bool is_signed(const typet &t)
Convenience function – is the type signed?
c_qualifierst c_qualifiers
const string_constantt & to_string_constant(const exprt &expr)
const type_with_subtypet & to_type_with_subtype(const typet &type)
const type_with_subtypest & to_type_with_subtypes(const typet &type)
Base class for all expressions.
Complex numbers made of pair of given subtype.
exprt::operandst ensures_contract
unsignedbv_typet unsigned_char_type()
Type with a single subtype.
unsigned gcc_float64x_cnt
const exprt::operandst & ensures_contract() const
struct configt::ansi_ct ansi_c
const exprt::operandst & assigns() const
floatbv_typet gcc_float128_type()
unsignedbv_typet unsigned_short_int_type()
const irep_idt & get(const irep_idt &name) const
floatbv_typet gcc_float64_type()
unsignedbv_typet unsigned_long_long_int_type()
unsignedbv_typet unsigned_long_int_type()
exprt::operandst requires
const code_typet & to_code_type(const typet &type)
Cast a typet to a code_typet.
signedbv_typet signed_int_type()
source_locationt source_location
#define forall_operands(it, expr)
signedbv_typet gcc_signed_int128_type()
void set(const irep_idt &name, const irep_idt &value)
exprt::operandst requires_contract
const source_locationt & source_location() const
signedbv_typet signed_short_int_type()
virtual void write(typet &src) const override
floatbv_typet float_type()
unsigned gcc_float128_cnt
unsignedbv_typet unsigned_int_type()
const irep_idt & id() const
source_locationt & add_source_location()
c_storage_spect c_storage_spec
const exprt::operandst & requires_contract() const
floatbv_typet double_type()
bitvector_typet char_type()
virtual void build_type_with_subtype(typet &type) const
Build a vector or complex type with type as subtype.
const exprt::operandst & ensures() const
unsignedbv_typet gcc_unsigned_int128_type()
signedbv_typet signed_long_int_type()
const typet & return_type() const
unsigned gcc_float128x_cnt
virtual void read(const typet &type)
There are a large number of kinds of tree structured or tree-like data in CPROVER.
std::size_t pointer_width
The pointer type These are both 'bitvector_typet' (they have a width) and 'type_with_subtypet' (they ...
A constant literal expression.
const source_locationt & source_location() const
floatbv_typet gcc_float32x_type()
const exprt::operandst & requires() const
const irep_idt & get_value() const
virtual void read_rec(const typet &type)
bool is_transparent_union
floatbv_typet gcc_float128x_type()