diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-10 14:06:01 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-12-10 14:06:01 -0800 |
commit | 871171ffa42fe24c27831f05227fb9adfc512448 (patch) | |
tree | 8e9b21217fa52761edb74fc969a5f741c3279ba3 /src/sat/pdr/pdrSat.c | |
parent | 6c766b4f1a18794b38c81a7c2f82f692cf6a9e37 (diff) | |
download | abc-871171ffa42fe24c27831f05227fb9adfc512448.tar.gz abc-871171ffa42fe24c27831f05227fb9adfc512448.tar.bz2 abc-871171ffa42fe24c27831f05227fb9adfc512448.zip |
Implemented rollback in the main SAT solver and updated PDR to use it (saves about 5% of runtime).
Diffstat (limited to 'src/sat/pdr/pdrSat.c')
-rw-r--r-- | src/sat/pdr/pdrSat.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/sat/pdr/pdrSat.c b/src/sat/pdr/pdrSat.c index 627cb654..cc4c2b1b 100644 --- a/src/sat/pdr/pdrSat.c +++ b/src/sat/pdr/pdrSat.c @@ -49,7 +49,8 @@ sat_solver * Pdr_ManCreateSolver( Pdr_Man_t * p, int k ) assert( Vec_VecSize(p->vClauses) == k ); assert( Vec_IntSize(p->vActVars) == k ); // create new solver - pSat = Pdr_ManNewSolver( p, k, (int)(k == 0) ); + pSat = sat_solver_new(); + pSat = Pdr_ManNewSolver( pSat, p, k, (int)(k == 0) ); Vec_PtrPush( p->vSolvers, pSat ); Vec_VecExpand( p->vClauses, k ); Vec_IntPush( p->vActVars, 0 ); @@ -80,9 +81,11 @@ sat_solver * Pdr_ManFetchSolver( Pdr_Man_t * p, int k ) return pSat; assert( k < Vec_PtrSize(p->vSolvers) - 1 ); p->nStarts++; - sat_solver_delete( pSat ); +// sat_solver_delete( pSat ); +// pSat = sat_solver_new(); + sat_solver_rollback( pSat ); // create new SAT solver - pSat = Pdr_ManNewSolver( p, k, (int)(k == 0) ); + pSat = Pdr_ManNewSolver( pSat, p, k, (int)(k == 0) ); // write new SAT solver Vec_PtrWriteEntry( p->vSolvers, k, pSat ); Vec_IntWriteEntry( p->vActVars, k, 0 ); |