CBMC
mathematical_types.cpp
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module: Mathematical types
4 
5 Author: Daniel Kroening, kroening@kroening.com
6  Maria Svorenova, maria.svorenova@diffblue.com
7 
8 \*******************************************************************/
9 
12 
13 #include "mathematical_types.h"
14 
17 bool is_number(const typet &type)
18 {
19  const irep_idt &id = type.id();
20  return id == ID_rational || id == ID_real || id == ID_integer ||
21  id == ID_natural || id == ID_complex || id == ID_unsignedbv ||
22  id == ID_signedbv || id == ID_floatbv || id == ID_fixedbv;
23 }
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition: dstring.h:38
const irep_idt & id() const
Definition: irep.h:384
The type of an expression, extends irept.
Definition: type.h:29
bool is_number(const typet &type)
Returns true if the type is a rational, real, integer, natural, complex, unsignedbv,...
Mathematical types.