|
FAUST compiler
0.9.9.6b8
|
Annotate a signal expression with recursivness information. More...
#include <assert.h>#include <stdio.h>#include <stdlib.h>#include <limits.h>#include "recursivness.hh"#include "property.hh"#include "signals.hh"#include "ppsig.hh"#include "set"
Go to the source code of this file.
Functions | |
| static int | annotate (Tree env, Tree sig) |
| Annotate a signal with recursivness. More... | |
| static int | position (Tree env, Tree t, int p) |
| return the position of a signal in the current recursive environment More... | |
| void | recursivnessAnnotation (Tree sig) |
| Annotate a signal with recursivness. More... | |
| int | getRecursivness (Tree sig) |
| Return the recursivness of a previously annotated signal. More... | |
| Tree | symlistVisit (Tree sig, set< Tree > &visited) |
| Tree | symlist (Tree sig) |
Variables | |
| Tree | RECURSIVNESS = tree(symbol("RecursivnessProp")) |
| property< Tree > | SymListProp |
| return the set of recursive symbols appearing in a signal. More... | |
Annotate a signal expression with recursivness information.
Recursiveness indicates the amount of recursive dependencies of a signal. A closed signal has a recursivness of 0 because is has no recursive dependencies. This means that the succesive samples of this signal can be computed in parallel. In a signal of type .(...F(x)...), F(x) has a recursivness of 1. In a signal of type .(... .(...F(x)...G(y)...)...) F(x) has a recursivness of 2 while G(y) has a recursivness of 1.
Definition in file recursivness.cpp.
Annotate a signal with recursivness.
| env | the current environment |
| sig | signal to annotate |
Definition at line 89 of file recursivness.cpp.
References cons(), getProperty(), getSubSignals(), isRec(), position(), RECURSIVNESS, setProperty(), tree(), and tree2int().
Referenced by recursivnessAnnotation().


| int getRecursivness | ( | Tree | sig | ) |
Return the recursivness of a previously annotated signal.
An error is generated if the signal has no recursivness property
| sig | signal |
Definition at line 72 of file recursivness.cpp.
References getProperty(), RECURSIVNESS, and tree2int().
Referenced by OccMarkup::incOcc().


return the position of a signal in the current recursive environment
| env | the current recursive environment of the signal |
| t | signal we want to know the position |
Definition at line 125 of file recursivness.cpp.
References hd(), isNil(), and tl().
Referenced by annotate().


| void recursivnessAnnotation | ( | Tree | sig | ) |
Annotate a signal with recursivness.
Should be used before calling getRecursivness
| sig | signal to annotate |
Definition at line 59 of file recursivness.cpp.
References annotate(), and nil.
Referenced by DocCompiler::annotate(), ScalarCompiler::prepare(), and ScalarCompiler::prepare2().


Definition at line 174 of file recursivness.cpp.
References property< Tree >::get(), property< Tree >::set(), SymListProp, and symlistVisit().
Referenced by Klass::closeLoop(), and typeAnnotation().


Definition at line 146 of file recursivness.cpp.
References property< Tree >::get(), getSubSignals(), isRec(), len(), nil, nth(), setUnion(), singleton(), and SymListProp.
Referenced by symlist().


Definition at line 50 of file recursivness.cpp.
Referenced by annotate(), and getRecursivness().
return the set of recursive symbols appearing in a signal.
| sig | the signal to analyze |
Definition at line 144 of file recursivness.cpp.
Referenced by symlist(), and symlistVisit().
1.8.7