30 set<Tree>::const_iterator e;
31 for (e= exps.begin(); e != exps.end(); e++) {
36 for (e = exps.begin(); e != exps.end(); e++) {
41 set_difference(exps.begin(), exps.end(), pre.begin(), pre.end(), inserter(post, post.begin()));
43 for (e = exps.begin(); e != exps.end(); e++) {
62 static map<Tree,int> colorMap;
63 static int nextFreeColor = 1;
64 int& color = colorMap[exp];
66 color = nextFreeColor++;
79 for (
int i=0; i<n; i++)
colorize(v[i], color);
110 for (
int i=0; i<n; i++) {
158 cset =
new set<int>();
177 return cset->find(color) != cset->end();
193 return (
int)cset->size();
static void addColor(Tree exp, int color)
a color to the colors of exp
static void uncolorize(Tree exp)
remove color information
static int allocateColor(Tree exp)
allocate a new unique color for exp
set< int > * getColorProperty(Tree sig)
retrieve the color-set property of sig
A CTree = (Node x [CTree]) is a Node associated with a list of subtrees called branches.
static int colorsCount(Tree exp)
returns the number of colors of exp
static void listMultiColoredExp(Tree exp, set< Tree > &lst)
list multicolored subexpressions of exp
static void clearColors(Tree exp)
remove the color property of exp
void * tree2ptr(Tree t)
if t has a node of type ptr, return it otherwise error
static void colorize(Tree exp, int color)
add color information to exp and all its subtrees
void setProperty(Tree t, Tree key, Tree val)
void splitDependance(const set< Tree > &exps, set< Tree > &post, set< Tree > &pre)
Analyze a set of expressions to discover its dependencies that is subexpressions common to at least t...
Symbol * symbol(const char *str)
Returns (and creates if new) the symbol of name str.
static bool hasColor(Tree exp, int color)
true if exp is already colored with color
void setColorProperty(Tree sig, set< int > *colorset)
set the color-set property of sig
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)