Commit 1531dd8e by Yen-Sheng Ho

%pdra: added an option -t for disabling trace reuse

parent 04bd8631
...@@ -182,6 +182,7 @@ struct Wlc_Par_t_ ...@@ -182,6 +182,7 @@ struct Wlc_Par_t_
int fProofUsePPI; // Use PPI values in PBR int fProofUsePPI; // Use PPI values in PBR
int fUseBmc3; // Run BMC3 in parallel int fUseBmc3; // Run BMC3 in parallel
int fShrinkAbs; // Shrink Abs with BMC int fShrinkAbs; // Shrink Abs with BMC
int fShrinkScratch; // Restart pdr from scratch after shrinking
int fVerbose; // verbose output int fVerbose; // verbose output
int fPdrVerbose; // verbose output int fPdrVerbose; // verbose output
}; };
......
...@@ -1511,7 +1511,7 @@ int Wla_ManSolve( Wla_Man_t * pWla, Aig_Man_t * pAig ) ...@@ -1511,7 +1511,7 @@ int Wla_ManSolve( Wla_Man_t * pWla, Aig_Man_t * pAig )
assert( Vec_VecSize( pWla->vClauses) >= 2 ); assert( Vec_VecSize( pWla->vClauses) >= 2 );
if ( pWla->fNewAbs ) if ( pWla->fNewAbs )
IPdr_ManRebuildClauses( pPdr, pWla->vClauses ); IPdr_ManRebuildClauses( pPdr, pWla->pPars->fShrinkScratch ? NULL : pWla->vClauses );
else else
IPdr_ManRestoreClauses( pPdr, pWla->vClauses, NULL ); IPdr_ManRestoreClauses( pPdr, pWla->vClauses, NULL );
......
...@@ -464,7 +464,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -464,7 +464,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
int c; int c;
Wlc_ManSetDefaultParams( pPars ); Wlc_ManSetDefaultParams( pPars );
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILabrcdipqmsuxvwh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILabrcdipqmstuxvwh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -567,6 +567,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -567,6 +567,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
case 's': case 's':
pPars->fShrinkAbs ^= 1; pPars->fShrinkAbs ^= 1;
break; break;
case 't':
pPars->fShrinkScratch ^= 1;
break;
case 'u': case 'u':
pPars->fCheckCombUnsat ^= 1; pPars->fCheckCombUnsat ^= 1;
break; break;
...@@ -590,7 +593,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -590,7 +593,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_NtkPdrAbs( pNtk, pPars ); Wlc_NtkPdrAbs( pNtk, pPars );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: %%pdra [-AMXFIL num] [-abrcdipqmxsuvwh]\n" ); Abc_Print( -2, "usage: %%pdra [-AMXFIL num] [-abrcdipqmxstuvwh]\n" );
Abc_Print( -2, "\t abstraction for word-level networks\n" ); Abc_Print( -2, "\t abstraction for word-level networks\n" );
Abc_Print( -2, "\t-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]\n", pPars->nBitsAdd ); Abc_Print( -2, "\t-A num : minimum bit-width of an adder/subtractor to abstract [default = %d]\n", pPars->nBitsAdd );
Abc_Print( -2, "\t-M num : minimum bit-width of a multiplier to abstract [default = %d]\n", pPars->nBitsMul ); Abc_Print( -2, "\t-M num : minimum bit-width of a multiplier to abstract [default = %d]\n", pPars->nBitsMul );
...@@ -606,6 +609,7 @@ usage: ...@@ -606,6 +609,7 @@ usage:
Abc_Print( -2, "\t-d : toggle using another way of creating abstractions [default = %s]\n", pPars->fAbs2? "yes": "no" ); Abc_Print( -2, "\t-d : toggle using another way of creating abstractions [default = %s]\n", pPars->fAbs2? "yes": "no" );
Abc_Print( -2, "\t-i : toggle using PPI values in proof-based refinement [default = %s]\n", pPars->fProofUsePPI? "yes": "no" ); Abc_Print( -2, "\t-i : toggle using PPI values in proof-based refinement [default = %s]\n", pPars->fProofUsePPI? "yes": "no" );
Abc_Print( -2, "\t-s : toggle shrinking abstractions with BMC [default = %s]\n", pPars->fShrinkAbs? "yes": "no" ); Abc_Print( -2, "\t-s : toggle shrinking abstractions with BMC [default = %s]\n", pPars->fShrinkAbs? "yes": "no" );
Abc_Print( -2, "\t-t : toggle restarting pdr from scratch after shrinking abstractions with BMC [default = %s]\n", pPars->fShrinkScratch? "yes": "no" );
Abc_Print( -2, "\t-u : toggle checking combinationally unsat [default = %s]\n", pPars->fCheckCombUnsat? "yes": "no" ); Abc_Print( -2, "\t-u : toggle checking combinationally unsat [default = %s]\n", pPars->fCheckCombUnsat? "yes": "no" );
Abc_Print( -2, "\t-p : toggle pushing clauses in the reloaded trace [default = %s]\n", pPars->fPushClauses? "yes": "no" ); Abc_Print( -2, "\t-p : toggle pushing clauses in the reloaded trace [default = %s]\n", pPars->fPushClauses? "yes": "no" );
Abc_Print( -2, "\t-q : toggle running bmc3 in parallel for CEX [default = %s]\n", pPars->fUseBmc3? "yes": "no" ); Abc_Print( -2, "\t-q : toggle running bmc3 in parallel for CEX [default = %s]\n", pPars->fUseBmc3? "yes": "no" );
......
...@@ -126,6 +126,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars ) ...@@ -126,6 +126,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
pPars->fProofUsePPI = 0; // Use PPI values in PBR pPars->fProofUsePPI = 0; // Use PPI values in PBR
pPars->fUseBmc3 = 0; // Run BMC3 in parallel pPars->fUseBmc3 = 0; // Run BMC3 in parallel
pPars->fShrinkAbs = 0; // Shrink Abs with BMC pPars->fShrinkAbs = 0; // Shrink Abs with BMC
pPars->fShrinkScratch= 0; // Restart pdr from scratch after shrinking
pPars->fVerbose = 0; // verbose output` pPars->fVerbose = 0; // verbose output`
pPars->fPdrVerbose = 0; // show verbose PDR output pPars->fPdrVerbose = 0; // show verbose PDR output
} }
......
...@@ -261,6 +261,9 @@ int IPdr_ManRebuildClauses( Pdr_Man_t * p, Vec_Vec_t * vClauses ) ...@@ -261,6 +261,9 @@ int IPdr_ManRebuildClauses( Pdr_Man_t * p, Vec_Vec_t * vClauses )
int RetValue = -1; int RetValue = -1;
int nCubes = 0; int nCubes = 0;
if ( vClauses == NULL )
return RetValue;
assert( Vec_VecSize(vClauses) >= 2 ); assert( Vec_VecSize(vClauses) >= 2 );
assert( Vec_VecSize(p->vClauses) == 0 ); assert( Vec_VecSize(p->vClauses) == 0 );
Vec_VecExpand( p->vClauses, 1 ); Vec_VecExpand( p->vClauses, 1 );
......
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