summaryrefslogtreecommitdiffstats
path: root/src/proof/cec
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-10-25 22:50:29 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-10-25 22:50:29 -0700
commitb733b813d687825e78bc4f9e4dd562ec639a25fc (patch)
tree2744d420365f03321dd6df963cf9b0f13f644e35 /src/proof/cec
parent37107a3b18475c037518d72c38113345a11bc34f (diff)
downloadabc-b733b813d687825e78bc4f9e4dd562ec639a25fc.tar.gz
abc-b733b813d687825e78bc4f9e4dd562ec639a25fc.tar.bz2
abc-b733b813d687825e78bc4f9e4dd562ec639a25fc.zip
Added switch '-q' to 'scorr' and '&scorr' to quit when PO is not a candidate constant.
Diffstat (limited to 'src/proof/cec')
-rw-r--r--src/proof/cec/cec.h1
-rw-r--r--src/proof/cec/cecCorr.c13
2 files changed, 14 insertions, 0 deletions
diff --git a/src/proof/cec/cec.h b/src/proof/cec/cec.h
index 10b06c28..65d2e24e 100644
--- a/src/proof/cec/cec.h
+++ b/src/proof/cec/cec.h
@@ -144,6 +144,7 @@ struct Cec_ParCor_t_
int fUseCSat; // use circuit-based solver
// int fFirstStop; // stop on the first sat output
int fUseSmartCnf; // use smart CNF computation
+ int fStopWhenGone; // quit when PO is not a candidate constant
int fVerboseFlops; // verbose stats
int fVeryVerbose; // verbose stats
int fVerbose; // verbose stats
diff --git a/src/proof/cec/cecCorr.c b/src/proof/cec/cecCorr.c
index f35cd952..f3a84d3a 100644
--- a/src/proof/cec/cecCorr.c
+++ b/src/proof/cec/cecCorr.c
@@ -753,6 +753,7 @@ void Cec_ManRefinedClassPrintStats( Gia_Man_t * p, Vec_Str_t * vStatus, int iIte
nFail++;
}
Abc_Print( 1, "p =%6d d =%6d f =%6d ", nProve, nDispr, nFail );
+ Abc_Print( 1, "%c ", Gia_ObjIsConst( p, Gia_ObjFaninId0p(p, Gia_ManPo(p, 0)) ) ? '+' : '-' );
Abc_PrintTime( 1, "T", Time );
}
@@ -950,6 +951,14 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
//Gia_ManEquivPrintClasses( pAig, 1, 0 );
if ( pPars->pFunc )
((int (*)(void *))pPars->pFunc)( pPars->pData );
+ // quit if const is no longer there
+ if ( pPars->fStopWhenGone && Gia_ManPoNum(pAig) == 1 && !Gia_ObjIsConst( pAig, Gia_ObjFaninId0p(pAig, Gia_ManPo(pAig, 0)) ) )
+ {
+ printf( "Iterative refinement is stopped after iteration %d\n", r );
+ printf( "because the property output is no longer a candidate constant.\n" );
+ Cec_ManSimStop( pSim );
+ return 0;
+ }
}
if ( pPars->fVerbose )
Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, clock() - clk );
@@ -1071,7 +1080,11 @@ Gia_Man_t * Cec_ManLSCorrespondence( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
ABC_FREE( pAig->pReprs );
ABC_FREE( pAig->pNexts );
if ( pPars->nPrefix == 0 )
+ {
RetValue = Cec_ManLSCorrespondenceClasses( pAig, pPars );
+ if ( RetValue == 0 )
+ return Gia_ManDup( pAig );
+ }
else
{
// compute the cycles AIG