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 
10 #include "boolbv_type.h"
11 
12 bvtypet get_bvtype(const typet &type)
13 {
14  if(type.id()==ID_signedbv)
15  return bvtypet::IS_SIGNED;
16  else if(type.id()==ID_unsignedbv)
17  return bvtypet::IS_UNSIGNED;
18  else if(type.id()==ID_c_bool)
19  return bvtypet::IS_C_BOOL;
20  else if(type.id()==ID_c_enum ||
21  type.id()==ID_c_enum_tag ||
22  type.id()==ID_incomplete_c_enum)
23  return bvtypet::IS_C_ENUM;
24  else if(type.id()==ID_floatbv)
25  return bvtypet::IS_FLOAT;
26  else if(type.id()==ID_fixedbv)
27  return bvtypet::IS_FIXED;
28  else if(type.id()==ID_bv)
29  return bvtypet::IS_BV;
30  else if(type.id()==ID_verilog_signedbv)
32  else if(type.id()==ID_verilog_unsignedbv)
34  else if(type.id()==ID_range)
35  return bvtypet::IS_RANGE;
36  else if(type.id()==ID_c_bit_field)
38 
39  return bvtypet::IS_UNKNOWN;
40 }
bvtypet::IS_SIGNED
typet
The type of an expression, extends irept.
Definition: type.h:27
bvtypet::IS_FIXED
bvtypet::IS_C_BIT_FIELD
boolbv_type.h
get_bvtype
bvtypet get_bvtype(const typet &type)
Definition: boolbv_type.cpp:12
bvtypet::IS_VERILOG_SIGNED
bvtypet::IS_RANGE
bvtypet::IS_UNSIGNED
bvtypet::IS_BV
bvtypet
bvtypet
Definition: boolbv_type.h:16
bvtypet::IS_VERILOG_UNSIGNED
bvtypet::IS_FLOAT
bvtypet::IS_C_BOOL
irept::id
const irep_idt & id() const
Definition: irep.h:259
bvtypet::IS_C_ENUM
bvtypet::IS_UNKNOWN