diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-09-28 16:27:39 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-09-28 16:27:39 -0700 |
commit | 4f0f2e09f84b66c1ed9a842a71a09f2f1ec65588 (patch) | |
tree | ecd646bd842662c7c4d165b3f2e7358c0d752c2b | |
parent | ca93730781ac2a6559e16a6203786073b1cbd514 (diff) | |
download | abc-4f0f2e09f84b66c1ed9a842a71a09f2f1ec65588.tar.gz abc-4f0f2e09f84b66c1ed9a842a71a09f2f1ec65588.tar.bz2 abc-4f0f2e09f84b66c1ed9a842a71a09f2f1ec65588.zip |
Adding flag 'pdr -e' to output only support variables in the invariant.
-rw-r--r-- | src/base/abci/abc.c | 8 | ||||
-rw-r--r-- | src/proof/pdr/pdr.h | 1 | ||||
-rw-r--r-- | src/proof/pdr/pdrCore.c | 1 | ||||
-rw-r--r-- | src/proof/pdr/pdrInv.c | 10 |
4 files changed, 12 insertions, 8 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 151d05c9..40598a89 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -25788,7 +25788,7 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv ) int c; Pdr_ManSetDefaultParams( pPars ); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "MFCDRTHGaxrmsipdgovwzh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "MFCDRTHGaxrmsipdegovwzh" ) ) != EOF ) { switch ( c ) { @@ -25904,6 +25904,9 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'd': pPars->fDumpInv ^= 1; break; + case 'e': + pPars->fUseSupp ^= 1; + break; case 'g': pPars->fSkipGeneral ^= 1; break; @@ -25951,7 +25954,7 @@ int Abc_CommandPdr( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - Abc_Print( -2, "usage: pdr [-MFCDRTHG <num>] [-axrmsipdgovwzh]\n" ); + Abc_Print( -2, "usage: pdr [-MFCDRTHG <num>] [-axrmsipdegovwzh]\n" ); Abc_Print( -2, "\t model checking using property directed reachability (aka IC3)\n" ); Abc_Print( -2, "\t pioneered by Aaron Bradley (http://ecee.colorado.edu/~bradleya/ic3/)\n" ); Abc_Print( -2, "\t with improvements by Niklas Een (http://een.se/niklas/)\n" ); @@ -25971,6 +25974,7 @@ usage: Abc_Print( -2, "\t-i : toggle clause pushing from an intermediate timeframe [default = %s]\n", pPars->fShiftStart? "yes": "no" ); Abc_Print( -2, "\t-p : toggle reusing proof-obligations in the last timeframe [default = %s]\n", pPars->fReuseProofOblig? "yes": "no" ); Abc_Print( -2, "\t-d : toggle dumping invariant (valid if init state is all-0) [default = %s]\n", pPars->fDumpInv? "yes": "no" ); + Abc_Print( -2, "\t-e : toggle using only support variables in the invariant [default = %s]\n", pPars->fUseSupp? "yes": "no" ); Abc_Print( -2, "\t-g : toggle skipping expensive generalization step [default = %s]\n", pPars->fSkipGeneral? "yes": "no" ); Abc_Print( -2, "\t-o : toggle using property output as inductive hypothesis [default = %s]\n", pPars->fUsePropOut? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing optimization summary [default = %s]\n", pPars->fVerbose? "yes": "no" ); diff --git a/src/proof/pdr/pdr.h b/src/proof/pdr/pdr.h index 3dffac17..529a161f 100644 --- a/src/proof/pdr/pdr.h +++ b/src/proof/pdr/pdr.h @@ -52,6 +52,7 @@ struct Pdr_Par_t_ int fTwoRounds; // use two rounds for generalization int fMonoCnf; // monolythic CNF int fDumpInv; // dump inductive invariant + int fUseSupp; // use support in the invariant int fShortest; // forces bug traces to be shortest int fShiftStart; // allows clause pushing to start from an intermediate frame int fReuseProofOblig; // reuses proof-obligationgs in the last timeframe diff --git a/src/proof/pdr/pdrCore.c b/src/proof/pdr/pdrCore.c index 5b619f4b..c020c56a 100644 --- a/src/proof/pdr/pdrCore.c +++ b/src/proof/pdr/pdrCore.c @@ -60,6 +60,7 @@ void Pdr_ManSetDefaultParams( Pdr_Par_t * pPars ) pPars->fTwoRounds = 0; // use two rounds for generalization pPars->fMonoCnf = 0; // monolythic CNF pPars->fDumpInv = 0; // dump inductive invariant + pPars->fUseSupp = 1; // using support variables in the invariant pPars->fShortest = 0; // forces bug traces to be shortest pPars->fUsePropOut = 1; // use property output pPars->fVerbose = 0; // verbose output diff --git a/src/proof/pdr/pdrInv.c b/src/proof/pdr/pdrInv.c index e5093359..02b90a36 100644 --- a/src/proof/pdr/pdrInv.c +++ b/src/proof/pdr/pdrInv.c @@ -339,7 +339,6 @@ void Pdr_ManDumpAig( Aig_Man_t * p, Vec_Ptr_t * vCubes ) ***********************************************************************/ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved ) { - int fUseSupp = 1; FILE * pFile; Vec_Int_t * vFlopCounts; Vec_Ptr_t * vCubes; @@ -370,14 +369,14 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved ) Count++; } // collect variable appearances - vFlopCounts = fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL; + vFlopCounts = p->pPars->fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL; // output the header if ( fProved ) fprintf( pFile, "# Inductive invariant for \"%s\"\n", p->pAig->pName ); else fprintf( pFile, "# Clauses of the last timeframe for \"%s\"\n", p->pAig->pName ); fprintf( pFile, "# generated by PDR in ABC on %s\n", Aig_TimeStamp() ); - fprintf( pFile, ".i %d\n", fUseSupp ? Pdr_ManCountVariables(p, kStart) : Aig_ManRegNum(p->pAig) ); + fprintf( pFile, ".i %d\n", p->pPars->fUseSupp ? Pdr_ManCountVariables(p, kStart) : Aig_ManRegNum(p->pAig) ); fprintf( pFile, ".o 1\n" ); fprintf( pFile, ".p %d\n", Count ); // output flop names @@ -386,7 +385,7 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved ) { fprintf( pFile, ".ilb" ); for ( i = 0; i < Aig_ManRegNum(p->pAig); i++ ) - if ( !fUseSupp || Vec_IntEntry( vFlopCounts, i ) ) + if ( !p->pPars->fUseSupp || Vec_IntEntry( vFlopCounts, i ) ) fprintf( pFile, " %s", pNamesCi[Saig_ManPiNum(p->pAig) + i] ); fprintf( pFile, "\n" ); ABC_FREE( pNamesCi ); @@ -423,7 +422,6 @@ void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved ) ***********************************************************************/ Vec_Str_t * Pdr_ManDumpString( Pdr_Man_t * p ) { - int fUseSupp = 1; Vec_Str_t * vStr; Vec_Int_t * vFlopCounts; Vec_Ptr_t * vCubes; @@ -438,7 +436,7 @@ Vec_Str_t * Pdr_ManDumpString( Pdr_Man_t * p ) vCubes = Vec_PtrDup( p->vInfCubes ); Vec_PtrSort( vCubes, (int (*)(void))Pdr_SetCompare ); // collect variable appearances - vFlopCounts = fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL; + vFlopCounts = p->pPars->fUseSupp ? Pdr_ManCountFlops( p, vCubes ) : NULL; // output cubes Vec_PtrForEachEntry( Pdr_Set_t *, vCubes, pCube, i ) { |