This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Compounds | |
| struct | Natnum |
| A structure for representing Natural Numbers from the Peano Arithmetic. More... | |
Typedefs | |
| typedef Natnum * | Natnum_t |
| Natnum_t : the object that will be operated on. More... | |
Functions | |
| Natnum_t | Z () |
| Natnum_t | S (const Natnum_t n) |
| Natnum_t | itsum (const Natnum_t, const Natnum_t) |
| Natnum_t | recsum (const Natnum_t, const Natnum_t) |
| Natnum_t | loopsum (const Natnum_t, const Natnum_t) |
| const Natnum_t | pred (const Natnum_t) |
| int | Zeq (Natnum_t) |
| int | eq (Natnum_t, Natnum_t) |
| unsigned | nn2uns (Natnum_t) |
| Natnum_t | uns2nn (unsigned) |
It defines the representation for Peano numbers and the interface to operations on them.
|
|
Natnum_t : the object that will be operated on. A Peano number will always be a pointer to a Natnum, i.e., a Natnum_t |
|
||||||||||||
|
equlity test Notice that equality is defined with respect to the intended representation |
|
||||||||||||
|
tail recursive function for computing sum over Natnum |
|
||||||||||||
|
The sum of two Natnum object, using iteration It implements invariant assertion. |
|
|
Converting a Natnum_t to binary representation |
|
|
the predecessor of a given number |
|
||||||||||||
|
recursive function for computing sum over Natnum it computes sum of two Natnum objects, using recursion with suspended computation (computation with draft on stack) |
|
|
A constructor for an object representing the successor of a given number
|
|
|
From binary to Natnum_t |
|
|
A constructor for an object representing the number zero |
|
|
whether a number is zero |
1.2.14 written by Dimitri van Heesch,
© 1997-2002