cprover
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
}
typet
The type of an expression, extends irept.
Definition:
type.h:28
boolbv_type.h
get_bvtype
bvtypet get_bvtype(const typet &type)
Definition:
boolbv_type.cpp:13
bvtypet::IS_BV
@ IS_BV
type.h
Defines typet, type_with_subtypet and type_with_subtypest.
bvtypet
bvtypet
Definition:
boolbv_type.h:17
irept::id
const irep_idt & id() const
Definition:
irep.h:407
solvers
flattening
boolbv_type.cpp
Generated by
1.8.20