Commit 3ae83d37 by Yen-Sheng Ho

%pdra, %abs: added option -d for apple-to-apple comparison

parent 6f8820fb
...@@ -178,6 +178,7 @@ struct Wlc_Par_t_ ...@@ -178,6 +178,7 @@ struct Wlc_Par_t_
int fProofRefine; // Use proof-based refinement int fProofRefine; // Use proof-based refinement
int fHybrid; // Use a hybrid of CBR and PBR int fHybrid; // Use a hybrid of CBR and PBR
int fCheckCombUnsat; // Check if ABS becomes comb. unsat int fCheckCombUnsat; // Check if ABS becomes comb. unsat
int fAbs2; // Use UFAR style createAbs
int fVerbose; // verbose output int fVerbose; // verbose output
int fPdrVerbose; // verbose output int fPdrVerbose; // verbose output
}; };
......
...@@ -1060,7 +1060,7 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars ) ...@@ -1060,7 +1060,7 @@ int Wlc_NtkPdrAbs( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
printf( "\nIteration %d:\n", nIters ); printf( "\nIteration %d:\n", nIters );
// get abstracted GIA and the set of pseudo-PIs (vPisNew) // get abstracted GIA and the set of pseudo-PIs (vPisNew)
if ( pPars->fProofRefine ) if ( pPars->fAbs2 || pPars->fProofRefine )
{ {
if ( vBlacks == NULL ) if ( vBlacks == NULL )
vBlacks = Wlc_NtkGetBlacks( p, pPars ); vBlacks = Wlc_NtkGetBlacks( p, pPars );
...@@ -1352,14 +1352,28 @@ int Wlc_NtkAbsCore( Wlc_Ntk_t * p, Wlc_Par_t * pPars ) ...@@ -1352,14 +1352,28 @@ int Wlc_NtkAbsCore( Wlc_Ntk_t * p, Wlc_Par_t * pPars )
Vec_Int_t * vPisNew, * vRefine; Vec_Int_t * vPisNew, * vRefine;
Gia_Man_t * pGia, * pTemp; Gia_Man_t * pGia, * pTemp;
Wlc_Ntk_t * pAbs; Wlc_Ntk_t * pAbs;
Vec_Int_t * vBlacks = NULL;
if ( pPars->fVerbose ) if ( pPars->fVerbose )
printf( "\nIteration %d:\n", nIters ); printf( "\nIteration %d:\n", nIters );
// get abstracted GIA and the set of pseudo-PIs (vPisNew) // get abstracted GIA and the set of pseudo-PIs (vPisNew)
if ( pPars->fAbs2 )
{
if ( vBlacks == NULL )
vBlacks = Wlc_NtkGetBlacks( p, pPars );
else
Wlc_NtkUpdateBlacks( p, pPars, &vBlacks, vUnmark );
pAbs = Wlc_NtkAbs2( p, vBlacks, NULL );
vPisNew = Vec_IntDup( vBlacks );
}
else
{
if ( nIters == 1 && pPars->nLimit < ABC_INFINITY ) if ( nIters == 1 && pPars->nLimit < ABC_INFINITY )
Wlc_NtkSetUnmark( p, pPars, vUnmark ); Wlc_NtkSetUnmark( p, pPars, vUnmark );
pAbs = Wlc_NtkAbs( p, pPars, vUnmark, &vPisNew, NULL, pPars->fVerbose ); pAbs = Wlc_NtkAbs( p, pPars, vUnmark, &vPisNew, NULL, pPars->fVerbose );
}
pGia = Wlc_NtkBitBlast( pAbs, NULL, -1, 0, 0, 0, 0 ); pGia = Wlc_NtkBitBlast( pAbs, NULL, -1, 0, 0, 0, 0 );
// if the abstraction has flops with DC-init state, // if the abstraction has flops with DC-init state,
......
...@@ -462,7 +462,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -462,7 +462,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, "AMXFILabrcpmuxvwh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILabrcdpmuxvwh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -547,6 +547,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -547,6 +547,9 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'c': case 'c':
pPars->fCheckClauses ^= 1; pPars->fCheckClauses ^= 1;
break; break;
case 'd':
pPars->fAbs2 ^= 1;
break;
case 'p': case 'p':
pPars->fPushClauses ^= 1; pPars->fPushClauses ^= 1;
break; break;
...@@ -576,7 +579,7 @@ int Abc_CommandPdrAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -576,7 +579,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] [-abrcpmxuvwh]\n" ); Abc_Print( -2, "usage: %%pdra [-AMXFIL num] [-abrcdpmxuvwh]\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 );
...@@ -589,6 +592,7 @@ usage: ...@@ -589,6 +592,7 @@ usage:
Abc_Print( -2, "\t-b : toggle using proof-based refinement [default = %s]\n", pPars->fProofRefine? "yes": "no" ); Abc_Print( -2, "\t-b : toggle using proof-based refinement [default = %s]\n", pPars->fProofRefine? "yes": "no" );
Abc_Print( -2, "\t-r : toggle using both cex-based and proof-based refinement [default = %s]\n", pPars->fHybrid? "yes": "no" ); Abc_Print( -2, "\t-r : toggle using both cex-based and proof-based refinement [default = %s]\n", pPars->fHybrid? "yes": "no" );
Abc_Print( -2, "\t-c : toggle checking clauses in the reloaded trace [default = %s]\n", pPars->fCheckClauses? "yes": "no" ); Abc_Print( -2, "\t-c : toggle checking clauses in the reloaded trace [default = %s]\n", pPars->fCheckClauses? "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-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-m : toggle refining the whole MFFC of a PPI [default = %s]\n", pPars->fMFFC? "yes": "no" ); Abc_Print( -2, "\t-m : toggle refining the whole MFFC of a PPI [default = %s]\n", pPars->fMFFC? "yes": "no" );
...@@ -617,7 +621,7 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -617,7 +621,7 @@ int Abc_CommandAbs( 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, "AMXFILxvwh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "AMXFILdxvwh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -687,6 +691,9 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -687,6 +691,9 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( pPars->nLimit < 0 ) if ( pPars->nLimit < 0 )
goto usage; goto usage;
break; break;
case 'd':
pPars->fAbs2 ^= 1;
break;
case 'x': case 'x':
pPars->fXorOutput ^= 1; pPars->fXorOutput ^= 1;
break; break;
...@@ -710,7 +717,7 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -710,7 +717,7 @@ int Abc_CommandAbs( Abc_Frame_t * pAbc, int argc, char ** argv )
Wlc_NtkAbsCore( pNtk, pPars ); Wlc_NtkAbsCore( pNtk, pPars );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: %%abs [-AMXFIL num] [-xvwh]\n" ); Abc_Print( -2, "usage: %%abs [-AMXFIL num] [-dxvwh]\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 );
...@@ -718,6 +725,7 @@ usage: ...@@ -718,6 +725,7 @@ usage:
Abc_Print( -2, "\t-F num : minimum bit-width of a flip-flop to abstract [default = %d]\n", pPars->nBitsFlop ); Abc_Print( -2, "\t-F num : minimum bit-width of a flip-flop to abstract [default = %d]\n", pPars->nBitsFlop );
Abc_Print( -2, "\t-I num : maximum number of CEGAR iterations [default = %d]\n", pPars->nIterMax ); Abc_Print( -2, "\t-I num : maximum number of CEGAR iterations [default = %d]\n", pPars->nIterMax );
Abc_Print( -2, "\t-L num : maximum number of each type of signals [default = %d]\n", pPars->nLimit ); Abc_Print( -2, "\t-L num : maximum number of each type of signals [default = %d]\n", pPars->nLimit );
Abc_Print( -2, "\t-d : toggle using another way of creating abstractions [default = %s]\n", pPars->fAbs2? "yes": "no" );
Abc_Print( -2, "\t-x : toggle XORing outputs of word-level miter [default = %s]\n", pPars->fXorOutput? "yes": "no" ); Abc_Print( -2, "\t-x : toggle XORing outputs of word-level miter [default = %s]\n", pPars->fXorOutput? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" ); Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-w : toggle printing verbose PDR output [default = %s]\n", pPars->fPdrVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggle printing verbose PDR output [default = %s]\n", pPars->fPdrVerbose? "yes": "no" );
......
...@@ -122,6 +122,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars ) ...@@ -122,6 +122,7 @@ void Wlc_ManSetDefaultParams( Wlc_Par_t * pPars )
pPars->fProofRefine = 0; // Use proof-based refinement pPars->fProofRefine = 0; // Use proof-based refinement
pPars->fHybrid = 1; // Use a hybrid of CBR and PBR pPars->fHybrid = 1; // Use a hybrid of CBR and PBR
pPars->fCheckCombUnsat = 0; // Check if ABS becomes comb. unsat pPars->fCheckCombUnsat = 0; // Check if ABS becomes comb. unsat
pPars->fAbs2 = 0; // Use UFAR style createAbs
pPars->fVerbose = 0; // verbose output` pPars->fVerbose = 0; // verbose output`
pPars->fPdrVerbose = 0; // show verbose PDR output pPars->fPdrVerbose = 0; // show verbose PDR output
} }
......
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