diff options
-rw-r--r-- | src/aig/gia/gia.h | 2 | ||||
-rw-r--r-- | src/aig/gia/giaSweeper.c | 9 | ||||
-rw-r--r-- | src/base/abci/abc.c | 8 | ||||
-rw-r--r-- | src/proof/ssc/ssc.h | 1 | ||||
-rw-r--r-- | src/proof/ssc/sscCore.c | 10 |
5 files changed, 21 insertions, 9 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index a6e36e6c..7849f363 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -1194,7 +1194,7 @@ extern int Gia_SweeperCheckEquiv( Gia_Man_t * p, int ProbeId1, i extern Gia_Man_t * Gia_SweeperExtractUserLogic( Gia_Man_t * p, Vec_Int_t * vProbeIds, Vec_Ptr_t * vInNames, Vec_Ptr_t * vOutNames ); extern Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime ); extern Vec_Int_t * Gia_SweeperGraft( Gia_Man_t * pDst, Vec_Int_t * vProbes, Gia_Man_t * pSrc ); -extern int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int nWords, int nConfs, int fVerbose ); +extern int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int nWords, int nConfs, int fVerify, int fVerbose ); extern int Gia_SweeperRun( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int fVerbose ); /*=== giaSwitch.c ============================================================*/ extern float Gia_ManEvaluateSwitching( Gia_Man_t * p ); diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c index 3c91c467..99d1154c 100644 --- a/src/aig/gia/giaSweeper.c +++ b/src/aig/gia/giaSweeper.c @@ -979,7 +979,7 @@ Vec_Int_t * Gia_SweeperGraft( Gia_Man_t * pDst, Vec_Int_t * vProbes, Gia_Man_t * SeeAlso [] ***********************************************************************/ -Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords, int nConfs, int fVerbose ) +Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords, int nConfs, int fVerify, int fVerbose ) { Vec_Int_t * vProbeConds; Gia_Man_t * pGiaCond, * pGiaOuts, * pGiaRes; @@ -987,6 +987,7 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords, Ssc_ManSetDefaultParams( pPars ); pPars->nWords = nWords; pPars->nBTLimit = nConfs; + pPars->fVerify = fVerify; pPars->fVerbose = fVerbose; // sweeper is running assert( Gia_SweeperIsRunning(p) ); @@ -1025,7 +1026,7 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords, SeeAlso [] ***********************************************************************/ -int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int nWords, int nConfs, int fVerbose ) +int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, int nWords, int nConfs, int fVerify, int fVerbose ) { Gia_Man_t * pNew; Vec_Int_t * vLits; @@ -1033,7 +1034,7 @@ int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, in // sweeper is running assert( Gia_SweeperIsRunning(p) ); // sweep the logic - pNew = Gia_SweeperSweep( p, vProbeIds, nWords, nConfs, fVerbose ); + pNew = Gia_SweeperSweep( p, vProbeIds, nWords, nConfs, fVerify, fVerbose ); if ( pNew == NULL ) return 0; // execute command line @@ -1131,7 +1132,7 @@ Gia_Man_t * Gia_SweeperFraigTest( Gia_Man_t * pInit, int nWords, int nConfs, int else // this is a constraint Gia_SweeperCondPush( p, Gia_SweeperProbeCreate( p, Gia_ObjFaninLit0p(p, pObj) ) ); // perform the sweeping - pGia = Gia_SweeperSweep( p, vOuts, nWords, nConfs, fVerbose ); + pGia = Gia_SweeperSweep( p, vOuts, nWords, nConfs, fVerbose, 0 ); // pGia = Gia_ManDup( p ); Vec_IntFree( vOuts ); // sop the sweeper diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index e37944cf..69e8ed84 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -28733,7 +28733,7 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv ) Ssc_Pars_t Pars, * pPars = &Pars; Ssc_ManSetDefaultParams( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "WCavh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "WCacvh" ) ) != EOF ) { switch ( c ) { @@ -28762,6 +28762,9 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'a': pPars->fAppend ^= 1; break; + case 'c': + pPars->fVerify ^= 1; + break; case 'v': pPars->fVerbose ^= 1; break; @@ -28779,13 +28782,14 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: &cfraig [-WC <num>] [-avh]\n" ); + Abc_Print( -2, "usage: &cfraig [-WC <num>] [-acvh]\n" ); Abc_Print( -2, "\t performs combinational SAT sweeping under constraints\n" ); Abc_Print( -2, "\t which are present in the AIG or set manually using \"constr\"\n" ); Abc_Print( -2, "\t (constraints are listed as last POs and true when they are 0)\n" ); Abc_Print( -2, "\t-W num : the number of simulation words [default = %d]\n", pPars->nWords ); Abc_Print( -2, "\t-C num : the max number of conflicts at a node [default = %d]\n", pPars->nBTLimit ); Abc_Print( -2, "\t-a : toggle appending constraints to the result [default = %s]\n", pPars->fAppend? "yes": "no" ); + Abc_Print( -2, "\t-c : toggle performing internal verification [default = %s]\n", pPars->fVerify? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; diff --git a/src/proof/ssc/ssc.h b/src/proof/ssc/ssc.h index 1112719c..aee29713 100644 --- a/src/proof/ssc/ssc.h +++ b/src/proof/ssc/ssc.h @@ -49,6 +49,7 @@ struct Ssc_Pars_t_ int nCallsRecycle; // calls to perform before recycling SAT solver int fAppend; // append constraints to the resulting AIG int fVerbose; // verbose stats + int fVerify; // enable internal verification }; //////////////////////////////////////////////////////////////////////// diff --git a/src/proof/ssc/sscCore.c b/src/proof/ssc/sscCore.c index bb89d936..0fb16103 100644 --- a/src/proof/ssc/sscCore.c +++ b/src/proof/ssc/sscCore.c @@ -261,7 +261,7 @@ int Ssc_PerformVerification( Gia_Man_t * p0, Gia_Man_t * p1, Gia_Man_t * pC ) SeeAlso [] ***********************************************************************/ -Gia_Man_t * Ssc_PerformSweeping( Gia_Man_t * pAig, Gia_Man_t * pCare, Ssc_Pars_t * pPars ) +Gia_Man_t * Ssc_PerformSweepingInt( Gia_Man_t * pAig, Gia_Man_t * pCare, Ssc_Pars_t * pPars ) { Ssc_Man_t * p; Gia_Man_t * pResult, * pTemp; @@ -410,6 +410,13 @@ p->timeSimSat += Abc_Clock() - clk; } return pResult; } +Gia_Man_t * Ssc_PerformSweeping( Gia_Man_t * pAig, Gia_Man_t * pCare, Ssc_Pars_t * pPars ) +{ + Gia_Man_t * pResult = Ssc_PerformSweepingInt( pAig, pCare, pPars ); + if ( pPars->fVerify ) + Ssc_PerformVerification( pAig, pResult, pCare ); + return pResult; +} Gia_Man_t * Ssc_PerformSweepingConstr( Gia_Man_t * p, Ssc_Pars_t * pPars ) { Gia_Man_t * pAig, * pCare, * pResult; @@ -443,7 +450,6 @@ Gia_Man_t * Ssc_PerformSweepingConstr( Gia_Man_t * p, Ssc_Pars_t * pPars ) pAig = Gia_ManDupLevelized( pResult = pAig ); Gia_ManStop( pResult ); pResult = Ssc_PerformSweeping( pAig, pCare, pPars ); - Ssc_PerformVerification( pAig, pResult, pCare ); if ( pPars->fAppend ) { Gia_ManDupAppendShare( pResult, pCare ); |