Commit 95d9aae3 by Alan Mishchenko

Bug fix in '&reachy' having to do with incorrect handling of resource limits.

parent 9b6efa34
...@@ -249,6 +249,7 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D ...@@ -249,6 +249,7 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D
int nThreshold = 10000; int nThreshold = 10000;
clock_t clk = clock(); clock_t clk = clock();
Vec_Ptr_t * vOnionRings; Vec_Ptr_t * vOnionRings;
int fixedPoint = 0;
status = Cudd_ReorderingStatus( dd, &method ); status = Cudd_ReorderingStatus( dd, &method );
if ( status ) if ( status )
...@@ -318,8 +319,10 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D ...@@ -318,8 +319,10 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D
bNext = Cudd_bddVarMap( dd, bTemp = bNext ); Cudd_Ref( bNext ); bNext = Cudd_bddVarMap( dd, bTemp = bNext ); Cudd_Ref( bNext );
Cudd_RecursiveDeref( dd, bTemp ); Cudd_RecursiveDeref( dd, bTemp );
// check if there are any new states // check if there are any new states
if ( Cudd_bddLeq( dd, bNext, bReached ) ) if ( Cudd_bddLeq( dd, bNext, bReached ) ) {
fixedPoint = 1;
break; break;
}
// check the BDD size // check the BDD size
nBddSize = Cudd_DagSize(bNext); nBddSize = Cudd_DagSize(bNext);
if ( nBddSize > pPars->nBddMax ) if ( nBddSize > pPars->nBddMax )
...@@ -405,16 +408,20 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D ...@@ -405,16 +408,20 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D
} }
//ABC_PRB( dd, bReached ); //ABC_PRB( dd, bReached );
Cudd_RecursiveDeref( dd, bReached ); Cudd_RecursiveDeref( dd, bReached );
if ( nIters > pPars->nIterMax || nBddSize > pPars->nBddMax ) // SPG
{ //
if ( !pPars->fSilent ) if ( fixedPoint ) {
printf( "Verified only for states reachable in %d frames. ", nIters ); if ( !pPars->fSilent ) {
return -1; // undecided printf( "The miter is proved unreachable after %d iterations. ", nIters );
}
pPars->iFrame = nIters - 1;
return 1;
} }
assert(nIters >= pPars->nIterMax || nBddSize >= pPars->nBddMax);
if ( !pPars->fSilent ) if ( !pPars->fSilent )
printf( "The miter is proved unreachable after %d iterations. ", nIters ); printf( "Verified only for states reachable in %d frames. ", nIters );
pPars->iFrame = nIters - 1; pPars->iFrame = nIters - 1;
return 1; // unreachable return -1; // undecided
} }
/**Function************************************************************* /**Function*************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment