diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-08-16 14:20:52 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-08-16 14:20:52 +0700 |
commit | 23d36a8d5665d7a586777c9723c4aa803b253fc1 (patch) | |
tree | 69210b61d5602dac1dccdea7a62756e813adb1c4 /src/base/abci | |
parent | d2747fb2815a4fea35a0bf23cb4941d61a1d99fc (diff) | |
download | abc-23d36a8d5665d7a586777c9723c4aa803b253fc1.tar.gz abc-23d36a8d5665d7a586777c9723c4aa803b253fc1.tar.bz2 abc-23d36a8d5665d7a586777c9723c4aa803b253fc1.zip |
Integrating Satoko into 'bmc' and 'bmc2'.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 28 | ||||
-rw-r--r-- | src/base/abci/abcDar.c | 8 |
2 files changed, 24 insertions, 12 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 01132def..a6a77571 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -24368,9 +24368,10 @@ int Abc_CommandBmc( Abc_Frame_t * pAbc, int argc, char ** argv ) int nCofFanLit; int fVerbose; int iFrames; + int fUseSatoko; char * pLogFileName = NULL; - extern int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames ); + extern int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames, int fUseSatoko ); // set defaults nFrames = 20; nSizeMax = 100000; @@ -24381,8 +24382,9 @@ int Abc_CommandBmc( Abc_Frame_t * pAbc, int argc, char ** argv ) fNewAlgo = 1; nCofFanLit = 0; fVerbose = 0; + fUseSatoko = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "FNCGDLrvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "FNCGDLrsvh" ) ) != EOF ) { switch ( c ) { @@ -24469,6 +24471,9 @@ int Abc_CommandBmc( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'a': fNewAlgo ^= 1; break; + case 's': + fUseSatoko ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -24493,7 +24498,7 @@ int Abc_CommandBmc( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Does not work for combinational networks.\n" ); return 0; } - pAbc->Status = Abc_NtkDarBmc( pNtk, 0, nFrames, nSizeMax, nNodeDelta, 0, nBTLimit, nBTLimitAll, fRewrite, fNewAlgo, 0, nCofFanLit, fVerbose, &iFrames ); + pAbc->Status = Abc_NtkDarBmc( pNtk, 0, nFrames, nSizeMax, nNodeDelta, 0, nBTLimit, nBTLimitAll, fRewrite, fNewAlgo, 0, nCofFanLit, fVerbose, &iFrames, fUseSatoko ); pAbc->nFrames = iFrames; Abc_FrameReplaceCex( pAbc, &pNtk->pSeqModel ); if ( pLogFileName ) @@ -24501,7 +24506,7 @@ int Abc_CommandBmc( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: bmc [-FNC num] [-L file] [-rcvh]\n" ); + Abc_Print( -2, "usage: bmc [-FNC num] [-L file] [-rcsvh]\n" ); Abc_Print( -2, "\t performs bounded model checking with static unrolling\n" ); Abc_Print( -2, "\t-F num : the number of time frames [default = %d]\n", nFrames ); Abc_Print( -2, "\t-N num : the max number of nodes in the frames [default = %d]\n", nSizeMax ); @@ -24510,6 +24515,7 @@ usage: Abc_Print( -2, "\t-L file: the log file name [default = %s]\n", pLogFileName ? pLogFileName : "no logging" ); Abc_Print( -2, "\t-r : toggle the use of rewriting [default = %s]\n", fRewrite? "yes": "no" ); // Abc_Print( -2, "\t-a : toggle SAT sweeping and SAT solving [default = %s]\n", fNewAlgo? "SAT solving": "SAT sweeping" ); + Abc_Print( -2, "\t-s : toggle using Satoko instead of build-in MiniSAT [default = %s]\n", fUseSatoko? "yes": "no" ); Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; @@ -24542,9 +24548,10 @@ int Abc_CommandBmc2( Abc_Frame_t * pAbc, int argc, char ** argv ) int fOrDecomp; int fVerbose; int iFrames; + int fUseSatoko; char * pLogFileName = NULL; - extern int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames ); + extern int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames, int fUseSatoko ); // set defaults nStart = 0; @@ -24558,8 +24565,9 @@ int Abc_CommandBmc2( Abc_Frame_t * pAbc, int argc, char ** argv ) fNewAlgo = 0; fOrDecomp = 0; fVerbose = 0; + fUseSatoko = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "SFNTCGDLruvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "SFNTCGDLrusvh" ) ) != EOF ) { switch ( c ) { @@ -24658,6 +24666,9 @@ int Abc_CommandBmc2( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'u': fOrDecomp ^= 1; break; + case 's': + fUseSatoko ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -24682,7 +24693,7 @@ int Abc_CommandBmc2( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Does not work for combinational networks.\n" ); return 0; } - pAbc->Status = Abc_NtkDarBmc( pNtk, nStart, nFrames, nSizeMax, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fRewrite, fNewAlgo, fOrDecomp, 0, fVerbose, &iFrames ); + pAbc->Status = Abc_NtkDarBmc( pNtk, nStart, nFrames, nSizeMax, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fRewrite, fNewAlgo, fOrDecomp, 0, fVerbose, &iFrames, fUseSatoko ); pAbc->nFrames = iFrames; Abc_FrameReplaceCex( pAbc, &pNtk->pSeqModel ); if ( pLogFileName ) @@ -24690,7 +24701,7 @@ int Abc_CommandBmc2( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: bmc2 [-SFTCGD num] [-L file] [-uvh]\n" ); + Abc_Print( -2, "usage: bmc2 [-SFTCGD num] [-L file] [-usvh]\n" ); Abc_Print( -2, "\t performs bounded model checking with dynamic unrolling\n" ); Abc_Print( -2, "\t-S num : the starting time frame [default = %d]\n", nStart ); Abc_Print( -2, "\t-F num : the max number of time frames (0 = unused) [default = %d]\n", nFrames ); @@ -24700,6 +24711,7 @@ usage: Abc_Print( -2, "\t-D num : the delta in the number of nodes [default = %d]\n", nNodeDelta ); Abc_Print( -2, "\t-L file: the log file name [default = %s]\n", pLogFileName ? pLogFileName : "no logging" ); Abc_Print( -2, "\t-u : toggle performing structural OR-decomposition [default = %s]\n", fOrDecomp? "yes": "no" ); + Abc_Print( -2, "\t-s : toggle using Satoko instead of build-in MiniSAT [default = %s]\n", fUseSatoko? "yes": "no" ); Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c index 147f7c2f..996ae6a2 100644 --- a/src/base/abci/abcDar.c +++ b/src/base/abci/abcDar.c @@ -2258,7 +2258,7 @@ static void sigfunc( int signo ) SeeAlso [] ***********************************************************************/ -int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames ) +int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int nNodeDelta, int nTimeOut, int nBTLimit, int nBTLimitAll, int fRewrite, int fNewAlgo, int fOrDecomp, int nCofFanLit, int fVerbose, int * piFrames, int fUseSatoko ) { Aig_Man_t * pMan; Vec_Int_t * vMap = NULL; @@ -2284,7 +2284,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int if ( fNewAlgo ) // command 'bmc' { int iFrame; - RetValue = Saig_ManBmcSimple( pMan, nFrames, nSizeMax, nBTLimit, fRewrite, fVerbose, &iFrame, nCofFanLit ); + RetValue = Saig_ManBmcSimple( pMan, nFrames, nSizeMax, nBTLimit, fRewrite, fVerbose, &iFrame, nCofFanLit, fUseSatoko ); if ( piFrames ) *piFrames = iFrame; ABC_FREE( pNtk->pModel ); @@ -2309,7 +2309,7 @@ ABC_PRT( "Time", Abc_Clock() - clk ); } else { - RetValue = Saig_BmcPerform( pMan, nStart, nFrames, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fVerbose, 0, piFrames, 0 ); + RetValue = Saig_BmcPerform( pMan, nStart, nFrames, nNodeDelta, nTimeOut, nBTLimit, nBTLimitAll, fVerbose, 0, piFrames, 0, fUseSatoko ); ABC_FREE( pNtk->pModel ); ABC_FREE( pNtk->pSeqModel ); pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL; @@ -2829,7 +2829,7 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i if ( pSecPar->fTryBmc ) { - RetValue = Saig_BmcPerform( pMan, 0, nBmcFramesMax, 2000, 0, nBmcConfMax, 0, pSecPar->fVerbose, 0, &iFrame, 0 ); + RetValue = Saig_BmcPerform( pMan, 0, nBmcFramesMax, 2000, 0, nBmcConfMax, 0, pSecPar->fVerbose, 0, &iFrame, 0, 0 ); if ( RetValue == 0 ) { Abc_Print( 1, "Networks are not equivalent.\n" ); |