aterm.cpp File Reference

#include "aterm.hh"
#include <stdio.h>
#include <assert.h>
#include "tlib.hh"
#include "signals.hh"
#include "sigprint.hh"
#include "sigorderrules.hh"
#include <map>
#include <list>
#include "simplify.hh"
#include "normalize.hh"
#include "ppsig.hh"
Include dependency graph for aterm.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef map< Tree, mtermSM

Functions

static Tree simplifyingAdd (Tree t1, Tree t2)
 Add two terms trying to simplify the result.

Typedef Documentation

typedef map<Tree,mterm> SM

Definition at line 9 of file aterm.cpp.


Function Documentation

static Tree simplifyingAdd ( Tree  t1,
Tree  t2 
) [static]

Add two terms trying to simplify the result.

Definition at line 33 of file aterm.cpp.

References addNums(), isNum(), isZero(), and sigAdd().

Referenced by aterm::normalizedTree().

00034 {
00035     assert(t1!=0);
00036     assert(t2!=0);
00037 
00038     if (isNum(t1) && isNum(t2)) {
00039         return addNums(t1,t2);
00040 
00041     } else if (isZero(t1)) {
00042         return t2;
00043 
00044     } else if (isZero(t2)) {
00045         return t1;
00046 
00047     } else if (t1 <= t2) {
00048         return sigAdd(t1, t2);
00049 
00050     } else {
00051         return sigAdd(t2, t1);
00052     }
00053 }

Here is the call graph for this function:

Here is the caller graph for this function:

Generated on Thu Jul 15 16:15:32 2010 for FAUST compiler by  doxygen 1.6.3