summaryrefslogtreecommitdiffstats
path: root/src/base/wlc
diff options
context:
space:
mode:
authorYen-Sheng Ho <ysho@berkeley.edu>2017-03-18 14:23:09 -0700
committerYen-Sheng Ho <ysho@berkeley.edu>2017-03-18 14:23:09 -0700
commit7713e94a1aee256db65a1939f1daafdec61d6675 (patch)
tree533043ebe3d5ba32dcc6500d0a66582896256f35 /src/base/wlc
parenteff11d95d20a3fcce5469ae104a0f5a424d2c1d6 (diff)
downloadabc-7713e94a1aee256db65a1939f1daafdec61d6675.tar.gz
abc-7713e94a1aee256db65a1939f1daafdec61d6675.tar.bz2
abc-7713e94a1aee256db65a1939f1daafdec61d6675.zip
%pdra: isolated the procedure for checking comb. unsat
Diffstat (limited to 'src/base/wlc')
-rw-r--r--src/base/wlc/wlcAbs.c86
1 files changed, 49 insertions, 37 deletions
diff --git a/src/base/wlc/wlcAbs.c b/src/base/wlc/wlcAbs.c
index c89ed187..3373cdd9 100644
--- a/src/base/wlc/wlcAbs.c
+++ b/src/base/wlc/wlcAbs.c
@@ -1251,6 +1251,54 @@ Aig_Man_t * Wla_ManBitBlast( Wla_Man_t * pWla, Wlc_Ntk_t * pAbs )
return pAig;
}
+int Wla_ManCheckCombUnsat( Wla_Man_t * pWla, Aig_Man_t * pAig )
+{
+ Pdr_Man_t * pPdr;
+ abctime clk;
+ int RetValue = -1;
+
+ if ( Aig_ManAndNum( pAig ) <= 20000 )
+ {
+ Aig_Man_t * pAigScorr;
+ Ssw_Pars_t ScorrPars, * pScorrPars = &ScorrPars;
+ int nAnds;
+
+ clk = Abc_Clock();
+
+ Ssw_ManSetDefaultParams( pScorrPars );
+ pScorrPars->fStopWhenGone = 1;
+ pScorrPars->nFramesK = 1;
+ pAigScorr = Ssw_SignalCorrespondence( pAig, pScorrPars );
+ assert ( pAigScorr );
+ nAnds = Aig_ManAndNum( pAigScorr);
+ Aig_ManStop( pAigScorr );
+
+ if ( nAnds == 0 )
+ {
+ if ( pWla->pPars->fVerbose )
+ Abc_PrintTime( 1, "SCORR proved UNSAT. Time", Abc_Clock() - clk );
+ return 1;
+ }
+ else if ( pWla->pPars->fVerbose )
+ {
+ Abc_Print( 1, "SCORR failed with %d ANDs. ", nAnds);
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
+ }
+ }
+
+ clk = Abc_Clock();
+
+ pWla->pPdrPars->fVerbose = 0;
+ pPdr = Pdr_ManStart( pAig, pWla->pPdrPars, NULL );
+ RetValue = IPdr_ManCheckCombUnsat( pPdr );
+ Pdr_ManStop( pPdr );
+ pWla->pPdrPars->fVerbose = pWla->pPars->fPdrVerbose;
+
+ pWla->tPdr += Abc_Clock() - clk;
+
+ return RetValue;
+}
+
int Wla_ManSolve( Wla_Man_t * pWla, Aig_Man_t * pAig )
{
abctime clk;
@@ -1259,45 +1307,9 @@ int Wla_ManSolve( Wla_Man_t * pWla, Aig_Man_t * pAig )
if ( pWla->vClauses && pWla->pPars->fCheckCombUnsat )
{
- if ( Aig_ManAndNum( pAig ) <= 20000 )
- {
- Aig_Man_t * pAigScorr;
- Ssw_Pars_t ScorrPars, * pScorrPars = &ScorrPars;
- int nAnds;
-
- clk = Abc_Clock();
-
- Ssw_ManSetDefaultParams( pScorrPars );
- pScorrPars->fStopWhenGone = 1;
- pScorrPars->nFramesK = 1;
- pAigScorr = Ssw_SignalCorrespondence( pAig, pScorrPars );
- assert ( pAigScorr );
- nAnds = Aig_ManAndNum( pAigScorr);
- Aig_ManStop( pAigScorr );
-
- if ( nAnds == 0 )
- {
- if ( pWla->pPars->fVerbose )
- Abc_PrintTime( 1, "SCORR proved UNSAT. Time", Abc_Clock() - clk );
- return 1;
- }
- else if ( pWla->pPars->fVerbose )
- {
- Abc_Print( 1, "SCORR failed with %d ANDs. ", nAnds);
- Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
- }
- }
-
clk = Abc_Clock();
- pWla->pPdrPars->fVerbose = 0;
- pPdr = Pdr_ManStart( pAig, pWla->pPdrPars, NULL );
- RetValue = IPdr_ManCheckCombUnsat( pPdr );
- Pdr_ManStop( pPdr );
- pWla->pPdrPars->fVerbose = pWla->pPars->fPdrVerbose;
-
- pWla->tPdr += Abc_Clock() - clk;
-
+ RetValue = Wla_ManCheckCombUnsat( pWla, pAig );
if ( RetValue == 1 )
{
if ( pWla->pPars->fVerbose )