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
dstringt has one field, an unsigned integer no which is an index into a static table of strings.
Definition:
dstring.h:36
is_number
bool is_number(const typet &type)
Returns true if the type is a rational, real, integer, natural, complex, unsignedbv,...
Definition:
mathematical_types.cpp:17
typet
The type of an expression, extends irept.
Definition:
type.h:28
mathematical_types.h
irept::id
const irep_idt & id() const
Definition:
irep.h:396
src
util
mathematical_types.cpp
Generated by
1.8.17