37 #define _TABLESIZE_COF 51113
46 #define _TABLESIZE_MINT 15113
147 DdNode * bCube, * bTemp, * bProd;
152 for ( i = 0; i < nFuncs; i++ )
193 DdNode * bEncoded, * bResult;
217 s_Encoded = bEncoded;
320 DdNode * aNode, * bNode, * bSum;
325 st__insert( Result, (
char*)bNode, (
char*)bSum );
367 if ( paNodes[0] ==
a1 )
370 pbCubesRes[0] = pbCubes[0];
Cudd_Ref( pbCubes[0] );
375 pbCubesRes[0] = pbCubes[0];
Cudd_Ref( pbCubes[0] );
385 for ( i = 0; i < nNodes; i++ )
389 for ( i = 0; i < nNodes; i++ )
484 if (
st__find_or_add( tNodeTopRef, (
char*)node, (
char***)&pTopLevel ) )
487 if ( *pTopLevel > TopLevelNew )
488 *pTopLevel = TopLevelNew;
493 *pTopLevel = TopLevelNew;
526 int LevelStart, Limit;
553 for ( i = 0; i <
size; i++ )
557 st__foreach_item( tNodeTopRef, gen, (
const char**)&node, (
char**)&LevelStart )
561 for ( i = LevelStart; i <= Limit; i++ )
565 if ( CutLevel != -1 && CutLevel != 0 )
570 for ( i = 0; i <
size; i++ )
571 if ( WidthMax < pProfile[i] )
572 WidthMax = pProfile[i];
638 DdNode * bColumn, * bCode;
650 s_pbTemp[ nCols ] = bColumn;
664 bRes = s_pbTemp[0];
Cudd_Ref( bRes );
674 for ( i = 0; i < nCols; i++ )
683 DdNode * bProd0, * bProd1;
738 int nEntries = (1<<(Level-1));
739 DdNode * bVars0, * bVars1;
740 unsigned nMint0, nMint1;
751 if ( bVarsCol ==
b1 )
760 for ( bTempV = bVarsCol; bTempV !=
b1; bTempV =
cuddT(bTempV) )
770 for ( i = 0; i < nEntries; i++ )
796 s_Field[Level][2*i + 0] = bVars0;
797 s_Field[Level][2*i + 1] = bVars1;
809 for ( k = 0; k < Level; k++ )
824 for ( k = 0; k < i; k++ )
937 if ( HHTable1[HKey].Arg1 == bFunc )
952 HHTable1[HKey].
Arg1 = bFunc;
958 DdNode * bFunc0, * bFunc1;
959 DdNode * bVarsCof0, * bVarsCof1;
968 int LevelTop = LevelF;
970 if ( LevelTop > LevelC )
973 if ( LevelTop > LevelA )
977 assert( !( LevelTop == LevelF || LevelTop == LevelC ) || LevelTop == LevelA );
980 if ( LevelTop == LevelF )
982 if ( bFuncR != bFunc )
989 bFunc0 =
cuddE(bFuncR);
990 bFunc1 =
cuddT(bFuncR);
994 bFunc0 = bFunc1 = bFunc;
997 if ( LevelTop == LevelC )
999 if ( bVarsCofR != bVarsCof )
1006 bVarsCof0 =
cuddE(bVarsCofR);
1007 bVarsCof1 =
cuddT(bVarsCofR);
1011 bVarsCof0 = bVarsCof1 = bVarsCof;
1019 if ( LevelTop == LevelC )
1021 if ( bVarsCof1 ==
b0 )
1052 HHTable1[HKey].
Arg1 = bFunc;
1079 return ((bFunc==s_Terminal)? 0: max);
1083 if ( HHTable2[HKey].Arg1 == bFunc && HHTable2[HKey].Arg2 == max )
1084 return HHTable2[HKey].
Res;
1091 HHTable2[HKey].
Arg1 = bFunc;
1093 HHTable2[HKey].
Res = min;
1189 DdNode * bCube0, * bCube1;
void st__free_table(st__table *table)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
double Cudd_CountMinterm(DdManager *manager, DdNode *node, int nvars)
int st__insert(st__table *table, const char *key, char *value)
void Cudd_Deref(DdNode *node)
DdNode * Cudd_addBddPattern(DdManager *dd, DdNode *f)
#define Cudd_IsConstant(node)
#define Cudd_Regular(node)
DdNode * Cudd_bddExistAbstract(DdManager *manager, DdNode *f, DdNode *cube)
int st__ptrcmp(const char *, const char *)
#define ABC_ALLOC(type, num)
static abctime Abc_Clock()
for(p=first;p->value< newval;p=p->next)
st__table * st__init_table(st__compare_func_type compare, st__hash_func_type hash)
#define Cudd_IsComplement(node)
int st__find_or_add(st__table *table, char *key, char ***slot)
DdNode * Cudd_Cofactor(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_END
#define cuddIsConstant(node)
DdNode * Cudd_BddToAdd(DdManager *dd, DdNode *B)
DdNode * Cudd_bddOr(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_START
static int Abc_Base2Log(unsigned n)
DdNode * Cudd_bddAnd(DdManager *dd, DdNode *f, DdNode *g)
#define st__foreach_item(table, gen, key, value)
int Cudd_SupportSize(DdManager *dd, DdNode *f)
int st__ptrhash(const char *, int)