76 cerr <<
"Error in getRecursivness of " << *sig << endl;
95 }
else if (
isRec(sig, var, body)) {
108 for (
unsigned int i=0; i<v.size(); i++) {
127 if (
isNil(env))
return 0;
128 if (
hd(env) == t)
return p;
151 }
else if ( visited.count(sig) > 0 ){
156 if (
isRec(sig,
id, body)) {
158 for (
int i=0; i<
len(body); i++) {
163 vector<Tree> subsigs;
166 for (
int i=0; i<n; i++) {
Tree symlistVisit(Tree sig, set< Tree > &visited)
int getRecursivness(Tree sig)
Return the recursivness of a previously annotated signal.
static int position(Tree env, Tree t, int p=1)
return the position of a signal in the current recursive environment
Tree cons(Tree a, Tree b)
int tree2int(Tree t)
if t has a node of type int, return it otherwise error
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
bool get(Tree t, Tree &data)
static int annotate(Tree env, Tree sig)
Annotate a signal with recursivness.
Tree setUnion(Tree A, Tree B)
property< Tree > SymListProp
return the set of recursive symbols appearing in a signal.
void recursivnessAnnotation(Tree sig)
Annotate a signal with recursivness.
void set(Tree t, Tree data)
bool isRec(Tree t, Tree &body)
is t a de Bruijn recursive tree
void setProperty(Tree t, Tree key, Tree val)
Symbol * symbol(const char *str)
Returns (and creates if new) the symbol of name str.
int getSubSignals(Tree sig, vector< Tree > &vsigs, bool visitgen=true)
Extract the sub signals of a signal expression, that is not necesseraly all the subtrees.
bool getProperty(Tree t, Tree key, Tree &val)