103 static char rcsid[]
DD_UNUSED =
"$Id: cuddBddIte.c,v 1.24 2004/08/13 18:04:46 fabio Exp $";
180 DdNode *r, *Fv, *Fnv, *Gv, *Gnv, *H, *Hv, *Hnv, *t, *e;
184 unsigned int topf, topg, toph, v;
217 v =
ddMin(topg, toph);
220 if (topf < v &&
cuddT(f) == one &&
cuddE(f) == zero) {
353 unsigned int saveLimit = dd->
maxLive;
542 unsigned int topf, topg, res;
546 if (f == g)
return(1);
567 if (g == one)
return(1);
568 if (f == one)
return(0);
571 if (f == zero)
return(1);
640 DdNode *r, *Fv, *Fnv, *Gv, *Gnv, *H, *Hv, *Hnv, *t, *e;
641 unsigned int topf, topg, toph, v;
649 if (f == (one =
DD_ONE(dd)))
656 if (g == one || f == g) {
663 }
else if (g == zero || f ==
Cudd_Not(g)) {
671 if (h == zero || f == h) {
674 }
else if (h == one || f ==
Cudd_Not(h)) {
692 v =
ddMin(topg, toph);
695 if (topf < v &&
cuddT(f) == one &&
cuddE(f) == zero) {
734 if (t == NULL)
return(NULL);
778 DdNode *fv, *fnv, *gv, *gnv;
780 unsigned int index, topf, topg;
787 if (f == zero || g == zero || f ==
Cudd_Not(g))
return(zero);
788 if (f == g || g == one)
return(f);
789 if (f == one)
return(g);
794 if (res != NULL)
return(res);
831 if (t == NULL)
return(NULL);
891 DdNode *F, *fv, *fnv, *G, *gv, *gnv;
893 unsigned int topf, topg, index;
902 if (f == g)
return(f);
906 if (f == one)
return(g);
910 if (g == one)
return(f);
924 if (F->
ref != 1 || G->
ref != 1) {
926 if (r != NULL)
return(r);
964 if (t == NULL)
return(NULL);
996 if (F->
ref != 1 || G->
ref != 1)
1022 DdNode *fv, *fnv, *G, *gv, *gnv;
1024 unsigned int topf, topg, index;
1031 if (f == g)
return(zero);
1038 if (g == zero)
return(f);
1051 if (r != NULL)
return(r);
1082 if (t == NULL)
return(NULL);
1178 unsigned int * topfp,
1179 unsigned int * topgp,
1180 unsigned int * tophp)
1182 register DdNode *F, *G, *H, *r, *f, *g, *h;
1183 register unsigned int topf, topg, toph;
1200 if ((topf > toph) || (topf == toph &&
cuddF2L(f) >
cuddF2L(h))) {
1210 }
else if (H == one) {
1211 if ((topf > topg) || (topf == topg &&
cuddF2L(f) >
cuddF2L(g))) {
1222 if ((topf > topg) || (topf == topg &&
cuddF2L(f) >
cuddF2L(g))) {
1280 unsigned int * topfp,
1281 unsigned int * topgp,
1282 unsigned int * tophp)
1284 register DdNode *r, *f, *g, *h;
static ABC_NAMESPACE_IMPL_START char rcsid[] DD_UNUSED
void Cudd_IterDerefBdd(DdManager *table, DdNode *n)
DdNode * Cudd_bddIntersect(DdManager *dd, DdNode *f, DdNode *g)
static int bddVarToCanonical(DdManager *dd, DdNode **fp, DdNode **gp, DdNode **hp, unsigned int *topfp, unsigned int *topgp, unsigned int *tophp)
DdNode * Cudd_bddOr(DdManager *dd, DdNode *f, DdNode *g)
void cuddCacheInsert2(DdManager *table, DD_CTFP op, DdNode *f, DdNode *g, DdNode *data)
#define DD_BDD_ITE_CONSTANT_TAG
#define Cudd_IsConstant(node)
#define Cudd_Regular(node)
void cuddCacheInsert(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h, DdNode *data)
static int bddVarToCanonicalSimple(DdManager *dd, DdNode **fp, DdNode **gp, DdNode **hp, unsigned int *topfp, unsigned int *topgp, unsigned int *tophp)
DdNode *(* DD_CTFP)(DdManager *, DdNode *, DdNode *)
DdNode * Cudd_bddAndLimit(DdManager *dd, DdNode *f, DdNode *g, unsigned int limit)
DdNode * Cudd_bddIteConstant(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
DdNode * Cudd_bddNor(DdManager *dd, DdNode *f, DdNode *g)
static abctime Abc_Clock()
DdNode * cuddCacheLookup2(DdManager *table, DD_CTFP op, DdNode *f, DdNode *g)
static void bddVarToConst(DdNode *f, DdNode **gp, DdNode **hp, DdNode *one)
#define Cudd_IsComplement(node)
DdNode * Cudd_bddXnor(DdManager *dd, DdNode *f, DdNode *g)
DdNode * Cudd_bddXor(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_END
DdNode * cuddConstantLookup(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)
int Cudd_bddLeq(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_START
DdNode * cuddBddIntersectRecur(DdManager *dd, DdNode *f, DdNode *g)
DdNode * cuddBddXorRecur(DdManager *manager, DdNode *f, DdNode *g)
DdNode * Cudd_bddNand(DdManager *dd, DdNode *f, DdNode *g)
#define Cudd_NotCond(node, c)
DdNode * Cudd_bddAnd(DdManager *dd, DdNode *f, DdNode *g)
DdNode * cuddBddAndRecur(DdManager *manager, DdNode *f, DdNode *g)
DdNode * Cudd_bddIte(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
DdNode * cuddUniqueInter(DdManager *unique, int index, DdNode *T, DdNode *E)
DdNode * cuddCacheLookup(DdManager *table, ptruint op, DdNode *f, DdNode *g, DdNode *h)
DdNode * cuddBddIteRecur(DdManager *dd, DdNode *f, DdNode *g, DdNode *h)