103 int v0 = ty->variability();
115 incOcc(env, v0, r0, d2, x);
116 incOcc(env, v0, r0, 0, y);
118 incOcc(env, v0, r0, 1, x);
119 incOcc(env, v0, r0, 0, y);
124 incOcc(env, v0, r0, 0, c);
125 incOcc(env, v0, r0, 0, c);
126 incOcc(env, v0, r0, 0, x);
127 incOcc(env, v0, r0, 0, y);
128 incOcc(env, v0, r0, 0, z);
133 for (
int i=0; i<n; i++)
incOcc(env, v0, r0, 0, br[i]);
170 if (
isNil(env))
return 0;
171 if (
hd(env) == t)
return p;
void incOcc(Tree env, int v, int r, int d, Tree t)
inc the occurence of t in context v,r
int getRecursivness(Tree sig)
Return the recursivness of a previously annotated signal.
Symbol * unique(const char *str)
Returns a new unique symbol of name strxxx.
static int position(Tree env, Tree t, int p)
return the position of a signal in the current recursive environment
bool isSigPrefix(Tree t, Tree &t0, Tree &t1)
bool hasOutDelayOccurences() const
true if has occurences outside a a delay
Tree fRootTree
occurences computed within this tree
Tree fPropKey
key used to store occurences property
void mark(Tree root)
start markup of root tree with new unique key
const int fXVariability
Extended Variability of the expression.
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
int fOccurences[4]
Occurences count according to Contexts.
bool isSigFixDelay(Tree t, Tree &t0, Tree &t1)
Occurences * retrieve(Tree t)
occurences of subtree t within root tree
bool isSigSelect3(Tree t, Tree &selector, Tree &s1, Tree &s2, Tree &s3)
bool hasMultiOccurences() const
true if multiple occurences or occ. in higher ctxt
bool isSigGen(Tree t, Tree &x)
void setOcc(Tree t, Occurences *occ)
set Occurences property of t
static int xVariability(int v, int r)
Extended Variability with recursiveness indication.
int checkDelayInterval(Type t)
Check is a type is appropriate for a delay.
bool fMultiOcc
True when exp has multiple occ. or occ. in higher ctxt.
void setProperty(Tree key, Tree value)
Type getCertifiedSigType(Tree sig)
Retrieve the type of sig and check it exists.
Occurences * incOccurences(int v, int r, int d)
inc occurences in context v,r,d
void * tree2ptr(Tree t)
if t has a node of type ptr, return it otherwise error
Occurences * getOcc(Tree t)
get Occurences property of t or null
int getMaxDelay() const
return the maximal delay collected
int fMaxDelay
Maximal fix delay usage.
Tree getProperty(Tree key)
bool fOutDelayOcc
True when exp has at least one occ. outside a delay.
API to the typing system of signals.
double min(double x, double y)
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.