CBMC
boolbv_type.cpp
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module:
4
5
Author: Daniel Kroening, kroening@kroening.com
6
7
\*******************************************************************/
8
9
#include "
boolbv_type.h
"
10
11
#include <
util/type.h
>
12
13
bvtypet
get_bvtype
(
const
typet
&type)
14
{
15
if
(type.
id
()==ID_signedbv)
16
return
bvtypet::IS_SIGNED
;
17
else
if
(type.
id
()==ID_unsignedbv)
18
return
bvtypet::IS_UNSIGNED
;
19
else
if
(type.
id
()==ID_c_bool)
20
return
bvtypet::IS_C_BOOL
;
21
else
if
(type.
id
() == ID_c_enum || type.
id
() == ID_c_enum_tag)
22
return
bvtypet::IS_C_ENUM
;
23
else
if
(type.
id
()==ID_floatbv)
24
return
bvtypet::IS_FLOAT
;
25
else
if
(type.
id
()==ID_fixedbv)
26
return
bvtypet::IS_FIXED
;
27
else
if
(type.
id
()==ID_bv)
28
return
bvtypet::IS_BV
;
29
else
if
(type.
id
()==ID_verilog_signedbv)
30
return
bvtypet::IS_VERILOG_SIGNED
;
31
else
if
(type.
id
()==ID_verilog_unsignedbv)
32
return
bvtypet::IS_VERILOG_UNSIGNED
;
33
else
if
(type.
id
()==ID_range)
34
return
bvtypet::IS_RANGE
;
35
else
if
(type.
id
()==ID_c_bit_field)
36
return
bvtypet::IS_C_BIT_FIELD
;
37
38
return
bvtypet::IS_UNKNOWN
;
39
}
get_bvtype
bvtypet get_bvtype(const typet &type)
Definition:
boolbv_type.cpp:13
boolbv_type.h
bvtypet
bvtypet
Definition:
boolbv_type.h:17
bvtypet::IS_BV
@ IS_BV
bvtypet::IS_RANGE
@ IS_RANGE
bvtypet::IS_C_ENUM
@ IS_C_ENUM
bvtypet::IS_C_BOOL
@ IS_C_BOOL
bvtypet::IS_FIXED
@ IS_FIXED
bvtypet::IS_VERILOG_UNSIGNED
@ IS_VERILOG_UNSIGNED
bvtypet::IS_VERILOG_SIGNED
@ IS_VERILOG_SIGNED
bvtypet::IS_UNKNOWN
@ IS_UNKNOWN
bvtypet::IS_FLOAT
@ IS_FLOAT
bvtypet::IS_SIGNED
@ IS_SIGNED
bvtypet::IS_UNSIGNED
@ IS_UNSIGNED
bvtypet::IS_C_BIT_FIELD
@ IS_C_BIT_FIELD
irept::id
const irep_idt & id() const
Definition:
irep.h:388
typet
The type of an expression, extends irept.
Definition:
type.h:29
type.h
Defines typet, type_with_subtypet and type_with_subtypest.
src
solvers
flattening
boolbv_type.cpp
Generated by
1.9.1