diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2018-03-25 16:46:09 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2018-03-25 16:46:09 -0700 |
commit | e639e8fd1ba990f782385b294a6cb5a21844f688 (patch) | |
tree | ac483596ac285dbdaa2492b03712565f455ec341 /src/sat | |
parent | c618cee66d9f82a8bf65de3f4b22a3c4b0c901d0 (diff) | |
download | abc-e639e8fd1ba990f782385b294a6cb5a21844f688.tar.gz abc-e639e8fd1ba990f782385b294a6cb5a21844f688.tar.bz2 abc-e639e8fd1ba990f782385b294a6cb5a21844f688.zip |
Integrating SAT-based CEX minimization.
Diffstat (limited to 'src/sat')
-rw-r--r-- | src/sat/bmc/bmc.h | 2 | ||||
-rw-r--r-- | src/sat/bmc/bmcCexCare.c | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/sat/bmc/bmc.h b/src/sat/bmc/bmc.h index 1d5180f3..71a33595 100644 --- a/src/sat/bmc/bmc.h +++ b/src/sat/bmc/bmc.h @@ -217,6 +217,8 @@ extern Abc_Cex_t * Bmc_CexCareExtendToObjects( Gia_Man_t * p, Abc_Cex_t * extern Abc_Cex_t * Bmc_CexCareMinimize( Aig_Man_t * p, int nRealPis, Abc_Cex_t * pCex, int nTryCexes, int fCheck, int fVerbose ); extern Abc_Cex_t * Bmc_CexCareMinimizeAig( Gia_Man_t * p, int nRealPis, Abc_Cex_t * pCex, int nTryCexes, int fCheck, int fVerbose ); extern void Bmc_CexCareVerify( Aig_Man_t * p, Abc_Cex_t * pCex, Abc_Cex_t * pCexMin, int fVerbose ); +extern Abc_Cex_t * Bmc_CexCareSatBasedMinimize( Aig_Man_t * p, int nRealPis, Abc_Cex_t * pCex, int fHighEffort, int fCheck, int fVerbose ); +extern Abc_Cex_t * Bmc_CexCareSatBasedMinimizeAig( Gia_Man_t * p, Abc_Cex_t * pCex, int fHighEffort, int fVerbose ); /*=== bmcCexCut.c ==========================================================*/ extern Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, int iFrEnd, int fCombOnly, int fGenAll, int fAllFrames, int fVerbose ); extern Aig_Man_t * Bmc_AigTargetStates( Aig_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, int iFrEnd, int fCombOnly, int fGenAll, int fAllFrames, int fVerbose ); diff --git a/src/sat/bmc/bmcCexCare.c b/src/sat/bmc/bmcCexCare.c index cc3e85ea..8db92444 100644 --- a/src/sat/bmc/bmcCexCare.c +++ b/src/sat/bmc/bmcCexCare.c @@ -430,6 +430,23 @@ Abc_Cex_t * Bmc_CexCareMinimize( Aig_Man_t * p, int nRealPis, Abc_Cex_t * pCex, Gia_ManStop( pGia ); return pCexMin; } +Abc_Cex_t * Bmc_CexCareSatBasedMinimize( Aig_Man_t * p, int nRealPis, Abc_Cex_t * pCex, int fHighEffort, int fCheck, int fVerbose ) +{ + Gia_Man_t * pGia = Gia_ManFromAigSimple( p ); + Abc_Cex_t * pCexMin = Bmc_CexCareSatBasedMinimizeAig( pGia, pCex, fHighEffort, fVerbose ); + if ( pCexMin == NULL ) + { + Gia_ManStop( pGia ); + return NULL; + } + // verify and return + if ( !Bmc_CexVerify( pGia, pCex, pCexMin ) ) + printf( "Counter-example verification has failed.\n" ); + else if ( fCheck ) + printf( "Counter-example verification succeeded.\n" ); + Gia_ManStop( pGia ); + return pCexMin; +} /**Function************************************************************* |