diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-08-14 20:04:08 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-08-14 20:04:08 +0700 |
commit | e21d307544218023726fe72f4fc2954d1c63af90 (patch) | |
tree | 349f37c976adbee9b48407fdd78651f2733196ea /src/aig/int | |
parent | 3344a46b2631e042822a3477a22b0d1836cdbcb1 (diff) | |
download | abc-e21d307544218023726fe72f4fc2954d1c63af90.tar.gz abc-e21d307544218023726fe72f4fc2954d1c63af90.tar.bz2 abc-e21d307544218023726fe72f4fc2954d1c63af90.zip |
Bug fix in interpolation (false positive if property fails in frame 0).
Diffstat (limited to 'src/aig/int')
-rw-r--r-- | src/aig/int/intCore.c | 4 | ||||
-rw-r--r-- | src/aig/int/intUtil.c | 17 |
2 files changed, 17 insertions, 4 deletions
diff --git a/src/aig/int/intCore.c b/src/aig/int/intCore.c index ceb0025c..c75dd584 100644 --- a/src/aig/int/intCore.c +++ b/src/aig/int/intCore.c @@ -93,12 +93,14 @@ int Inter_ManPerformInterpolation( Aig_Man_t * pAig, Inter_ManParams_t * pPars, assert( Saig_ManPoNum(pAig)-Saig_ManConstrNum(pAig) == 1 ); if ( pPars->fVerbose && Saig_ManConstrNum(pAig) ) printf( "Performing interpolation with %d constraints...\n", Saig_ManConstrNum(pAig) ); -/* + if ( Inter_ManCheckInitialState(pAig) ) { + *piFrame = 0; printf( "Property trivially fails in the initial state.\n" ); return 0; } +/* if ( Inter_ManCheckAllStates(pAig) ) { printf( "Property trivially holds in all states.\n" ); diff --git a/src/aig/int/intUtil.c b/src/aig/int/intUtil.c index 0d8beda5..ce48c37d 100644 --- a/src/aig/int/intUtil.c +++ b/src/aig/int/intUtil.c @@ -46,17 +46,28 @@ ABC_NAMESPACE_IMPL_START int Inter_ManCheckInitialState( Aig_Man_t * p ) { Cnf_Dat_t * pCnf; + Aig_Obj_t * pObj; sat_solver * pSat; - int status; + int i, status; int clk = clock(); pCnf = Cnf_Derive( p, Saig_ManRegNum(p) ); pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 1 ); - Cnf_DataFree( pCnf ); if ( pSat == NULL ) + { + Cnf_DataFree( pCnf ); return 0; + } status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 ); - sat_solver_delete( pSat ); ABC_PRT( "Time", clock() - clk ); + if ( status == l_True ) + { + p->pSeqModel = Abc_CexAlloc( Aig_ManRegNum(p), Saig_ManPiNum(p), 1 ); + Saig_ManForEachPi( p, pObj, i ) + if ( sat_solver_var_value( pSat, pCnf->pVarNums[Aig_ObjId(pObj)] ) ) + Aig_InfoSetBit( p->pSeqModel->pData, Aig_ManRegNum(p) + i ); + } + Cnf_DataFree( pCnf ); + sat_solver_delete( pSat ); return status == l_True; } |