48 DdNode ** pbVarsX, ** pbVarsY;
49 DdNode * bTemp, * bProd, * bVar;
138 int fInternalReorder = 0;
141 DdNode * bReached, * bCubeCs;
142 DdNode * bCurrent, * bNext = NULL, * bTemp;
145 int i, nIters, nBddSize;
146 int nThreshold = 10000;
164 bCurrent = bInitial;
Cudd_Ref( bCurrent );
165 bReached = bInitial;
Cudd_Ref( bReached );
167 for ( nIters = 1; nIters <= nIterMax; nIters++ )
184 if ( nBddSize > nBddMax )
189 printf(
"The miter is proved REACHABLE in %d iterations. ", nIters );
204 fprintf( stdout,
"Iteration = %3d. BDD = %5d. ", nIters, nBddSize );
205 if ( fInternalReorder && fReorder && nBddSize > nThreshold )
208 fprintf( stdout,
"Reordering... Before = %5d. ",
Cudd_DagSize(bReached) );
212 fprintf( stdout,
"After = %5d.\r",
Cudd_DagSize(bReached) );
216 fprintf( stdout,
"\r" );
224 if ( bReached == NULL )
230 if ( nIters > nIterMax ||
Cudd_DagSize(bReached) > nBddMax )
231 fprintf( stdout,
"Reachability analysis is stopped after %d iterations.\n", nIters );
233 fprintf( stdout,
"Reachability analysis completed in %d iterations.\n", nIters );
234 fprintf( stdout,
"Reachable states = %.0f. (Ratio = %.4f %%)\n", nMints, 100.0*nMints/pow(2.0,
Abc_NtkLatchNum(pNtk)) );
239 if ( nIters > nIterMax ||
Cudd_DagSize(bReached) > nBddMax )
240 printf(
"Verified ONLY FOR STATES REACHED in %d iterations. \n", nIters );
241 printf(
"The miter is proved unreachable in %d iteration. ", nIters );
260 DdNode * bOutput, * bReached, * bInitial;
272 printf(
"The number of intermediate BDD nodes exceeded the limit (%d).\n", nBddMax );
289 printf(
"The miter is proved REACHABLE in the initial state. " );
293 bReached =
Abc_NtkComputeReachable( dd, pNtk, pbParts, bInitial, bOutput, nBddMax, nIterMax, fPartition, fReorder, fVerbose );
294 if ( bReached != NULL )
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
double Cudd_CountMinterm(DdManager *manager, DdNode *node, int nvars)
void Abc_NtkVerifyUsingBdds(Abc_Ntk_t *pNtk, int nBddMax, int nIterMax, int fPartition, int fReorder, int fVerbose)
void Cudd_Deref(DdNode *node)
static int Abc_ObjFanoutNum(Abc_Obj_t *pObj)
int Cudd_SetVarMap(DdManager *manager, DdNode **x, DdNode **y, int n)
static int Abc_NtkLatchNum(Abc_Ntk_t *pNtk)
static int Abc_NtkCiNum(Abc_Ntk_t *pNtk)
#define ABC_ALLOC(type, num)
static abctime Abc_Clock()
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
static void * Abc_ObjGlobalBdd(Abc_Obj_t *pObj)
ABC_DLL void * Abc_NtkFreeGlobalBdds(Abc_Ntk_t *pNtk, int fFreeMan)
DdNode * Cudd_bddVarMap(DdManager *manager, DdNode *f)
DdNode ** Abc_NtkCreatePartitions(DdManager *dd, Abc_Ntk_t *pNtk, int fReorder, int fVerbose)
#define ABC_NAMESPACE_IMPL_END
#define Abc_NtkForEachLatch(pNtk, pObj, i)
ABC_NAMESPACE_IMPL_START DdNode * Abc_NtkInitStateVarMap(DdManager *dd, Abc_Ntk_t *pNtk, int fVerbose)
DECLARATIONS ///.
static int Abc_LatchIsInit1(Abc_Obj_t *pLatch)
DdNode * Cudd_bddXnor(DdManager *dd, DdNode *f, DdNode *g)
DdNode * Cudd_bddOr(DdManager *dd, DdNode *f, DdNode *g)
#define ABC_NAMESPACE_IMPL_START
void Cudd_AutodynDisable(DdManager *unique)
int Cudd_bddLeq(DdManager *dd, DdNode *f, DdNode *g)
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
static int Abc_NtkPiNum(Abc_Ntk_t *pNtk)
DdNode * Cudd_bddIthVar(DdManager *dd, int i)
unsigned int Cudd_ReadKeys(DdManager *dd)
#define Cudd_NotCond(node, c)
DdNode * Cudd_bddAnd(DdManager *dd, DdNode *f, DdNode *g)
DdNode * Abc_NtkComputeReachable(DdManager *dd, Abc_Ntk_t *pNtk, DdNode **pbParts, DdNode *bInitial, DdNode *bOutput, int nBddMax, int nIterMax, int fPartition, int fReorder, int fVerbose)
int Cudd_ReduceHeap(DdManager *table, Cudd_ReorderingType heuristic, int minsize)
void Cudd_AutodynEnable(DdManager *unique, Cudd_ReorderingType method)
ABC_DLL void * Abc_NtkBuildGlobalBdds(Abc_Ntk_t *pNtk, int fBddSizeMax, int fDropInternal, int fReorder, int fVerbose)
unsigned int Cudd_ReadDead(DdManager *dd)
int Cudd_SharingSize(DdNode **nodeArray, int n)
int Cudd_DagSize(DdNode *node)