100 for ( i = 0; i < 15; i++ )
102 printf(
"%2d : ", i );
104 for ( v = 0; v < 4; v++ )
123 DdNode * bCube, * bVar, * bTemp;
126 for ( i = 0; i < nVars; i++ )
128 if ( pLine[i] ==
'-' )
130 else if ( pLine[i] ==
'0' )
132 else if ( pLine[i] ==
'1' )
156 char Buffer[1000], * pLine;
157 DdNode * bCube, * bTemp, * bProd, * bVar0, * bVar1, * bCubeSum;
164 for ( i = 0; i < 15; i++ )
165 for ( v = 0; v < 4; v++ )
172 pFile = fopen(
"input.pla",
"r" );
173 while ( fgets( Buffer, 1000, pFile ) )
175 if ( Buffer[0] ==
'#' )
177 if ( Buffer[0] ==
'.' )
179 if ( Buffer[1] ==
'e' )
189 for ( i = 0; i < 15; i++ )
191 if ( pLine[2*i] ==
'-' && pLine[2*i+1] ==
'-' )
193 for ( v = 0; v < 4; v++ )
195 p->bValueDcs[i][v] =
Cudd_bddOr( p->dd, bTemp = p->bValueDcs[i][v], bCube );
Cudd_Ref( p->bValueDcs[i][v] );
200 else if ( pLine[2*i] ==
'0' && pLine[2*i+1] ==
'0' )
202 else if ( pLine[2*i] ==
'1' && pLine[2*i+1] ==
'0' )
204 else if ( pLine[2*i] ==
'0' && pLine[2*i+1] ==
'1' )
206 else if ( pLine[2*i] ==
'1' && pLine[2*i+1] ==
'1' )
210 p->bValues[i][v] =
Cudd_bddOr( p->dd, bTemp = p->bValues[i][v], bCube );
Cudd_Ref( p->bValues[i][v] );
221 for ( i = 0; i < 15; i++ )
222 for ( v = 0; v < 4; v++ )
226 p->bValues[i][v] =
Cudd_bddOr( p->dd, bTemp = p->bValues[i][v], p->bValueDcs[i][v] );
Cudd_Ref( p->bValues[i][v] );
235 for ( i = 0; i < 15; i++ )
238 for ( v = 0; v < 4; v++ )
246 p->bFuncs[i] =
Cudd_bddOr( p->dd, bTemp = p->bFuncs[i], bProd );
Cudd_Ref( p->bFuncs[i] );
267 for ( i = 0; i < 15; i++ )
268 for ( v = 0; v < 4; v++ )
273 for ( i = 0; i < 15; i++ )
292 DdNode * bCofs[16], * bVarCube1, * bVarCube2, * bVarCube, * bCube, * bVar0, * bVar1;
293 int k, i1, i2, v1, v2;
299 for ( k = 0; k < p->nFuncs; k++ )
301 printf(
"FUNCTION %d\n", k );
302 for ( i1 = 0; i1 < p->nFuncs; i1++ )
303 for ( i2 = i1+1; i2 < p->nFuncs; i2++ )
307 for ( v1 = 0; v1 < 4; v1++ )
312 for ( v2 = 0; v2 < 4; v2++ )
350 for ( v1 = 0; v1 < 4; v1++ )
351 for ( v2 = 0; v2 < 4; v2++ )
357 for ( v1 = 0; v1 < 4; v1++ )
358 for ( v2 = 0; v2 < 4; v2++ )
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.
#define CUDD_UNIQUE_SLOTS
static void Abc_MvDecompose(Mv_Man_t *p)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
double Cudd_CountMinterm(DdManager *manager, DdNode *node, int nvars)
static int Vec_PtrPushUnique(Vec_Ptr_t *p, void *Entry)
void Cudd_Deref(DdNode *node)
DdNode * Cudd_ReadLogicZero(DdManager *dd)
typedefABC_NAMESPACE_IMPL_START struct Mv_Man_t_ Mv_Man_t
DECLARATIONS ///.
static void Abc_MvRead(Mv_Man_t *p)
#define ABC_ALLOC(type, num)
static int Vec_PtrSize(Vec_Ptr_t *p)
static void Abc_MvPrintStats(Mv_Man_t *p)
DdNode * Cudd_Cofactor(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_END
DdManager * Cudd_Init(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int cacheSize, unsigned long maxMemory)
void Abc_MvExperiment()
FUNCTION DEFINITIONS ///.
DdNode * Cudd_bddOr(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_START
DdNode * Cudd_ReadOne(DdManager *dd)
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
DdNode * bValueDcs[15][4]
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
#define Cudd_NotCond(node, c)
DdNode * Cudd_bddAnd(DdManager *dd, DdNode *f, DdNode *g)
static DdNode * Abc_MvReadCube(DdManager *dd, char *pLine, int nVars)
int Cudd_SupportSize(DdManager *dd, DdNode *f)
static void Abc_MvDeref(Mv_Man_t *p)
int Cudd_DagSize(DdNode *node)
static void Vec_PtrFree(Vec_Ptr_t *p)