diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-02-16 14:23:52 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-02-16 14:23:52 -0800 |
commit | f1dba69c576a9b995f87673ce6d6ccbaddf647b6 (patch) | |
tree | 6b6e602c726082ee95dcb71a1d8e6b7359dc966c /src/sat/bsat/satSolver2.h | |
parent | ce945006e13d380d85e4ceba77b780f1690af160 (diff) | |
download | abc-f1dba69c576a9b995f87673ce6d6ccbaddf647b6.tar.gz abc-f1dba69c576a9b995f87673ce6d6ccbaddf647b6.tar.bz2 abc-f1dba69c576a9b995f87673ce6d6ccbaddf647b6.zip |
Improved memory management of proof-logging and propagated changes.
Diffstat (limited to 'src/sat/bsat/satSolver2.h')
-rw-r--r-- | src/sat/bsat/satSolver2.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/src/sat/bsat/satSolver2.h b/src/sat/bsat/satSolver2.h index 4b1eec61..ffbae964 100644 --- a/src/sat/bsat/satSolver2.h +++ b/src/sat/bsat/satSolver2.h @@ -29,6 +29,7 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA #include <assert.h> #include "satVec.h" +#include "vecSet.h" ABC_NAMESPACE_HEADER_START @@ -112,16 +113,19 @@ struct sat_solver2_t veci clauses; // clause memory veci learnts; // learnt memory veci* wlists; // watcher lists (for each literal) + veci claActs; // clause activities + veci claProofs; // clause proofs int hLearntLast; // in proof-logging mode, the ID of the final conflict clause (conf_final) int hProofLast; // in proof-logging mode, the ID of the final conflict clause (conf_final) - int hClausePivot; // the pivot among problem clause - int hLearntPivot; // the pivot among learned clause - int iVarPivot; // the pivot among the variables - int iSimpPivot; // marker of unit-clauses int nof_learnts; // the number of clauses to trigger reduceDB - veci claActs; // clause activities - veci claProofs; // clause proofs + // rollback + int iVarPivot; // the pivot for variables + int iTrailPivot; // the pivot for trail + int iProofPivot; // the pivot for proof records + int hClausePivot; // the pivot for problem clause + int hLearntPivot; // the pivot for learned clause + int hProofPivot; // the pivot for proof records // internal state varinfo2 * vi; // variable information @@ -146,8 +150,8 @@ struct sat_solver2_t veci learnt_live; // remaining clauses after reduce DB // proof logging - veci proofs; // sequence of proof records - int iStartChain; // temporary variable to remember beginning of the current chain in proof logging + Vec_Set_t Proofs; // sequence of proof records + veci temp_proof; // temporary place to store proofs int nUnits; // the total number of unit clauses // statistics @@ -251,10 +255,12 @@ static inline int sat_solver2_set_learntmax(sat_solver2* s, int nLearntMax) static inline void sat_solver2_bookmark(sat_solver2* s) { assert( s->qhead == s->qtail ); - s->hLearntPivot = veci_size(&s->learnts); - s->hClausePivot = veci_size(&s->clauses); s->iVarPivot = s->size; - s->iSimpPivot = s->qhead; + s->iTrailPivot = s->qhead; + s->iProofPivot = Vec_SetEntryNum(&s->Proofs); + s->hClausePivot = veci_size(&s->clauses); + s->hLearntPivot = veci_size(&s->learnts); + s->hProofPivot = Vec_SetHandCurrent(&s->Proofs); } static inline int sat_solver2_add_const( sat_solver2 * pSat, int iVar, int fCompl, int fMark ) |