diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-01-12 07:28:01 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-01-12 07:28:01 -0800 |
commit | 56cc5734a4f9b75484142d5c964397bd2e00300e (patch) | |
tree | 80a78297efdae672ad2638c005c7dcc30423cc6f | |
parent | fadde52dc661a8f7afc02f2cb4b2ebc2be97bbc0 (diff) | |
download | abc-56cc5734a4f9b75484142d5c964397bd2e00300e.tar.gz abc-56cc5734a4f9b75484142d5c964397bd2e00300e.tar.bz2 abc-56cc5734a4f9b75484142d5c964397bd2e00300e.zip |
Bug fix related to not properly resizing SAT solver's model array.
-rw-r--r-- | src/sat/bsat/satSolver.c | 1 | ||||
-rw-r--r-- | src/sat/bsat/satSolver2.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/sat/bsat/satSolver.c b/src/sat/bsat/satSolver.c index a4bd29cd..188a504f 100644 --- a/src/sat/bsat/satSolver.c +++ b/src/sat/bsat/satSolver.c @@ -1035,6 +1035,7 @@ void sat_solver_setnvars(sat_solver* s,int n) s->tags [var] = 0; s->orderpos[var] = veci_size(&s->order); s->reasons [var] = 0; + s->model [var] = 0; /* does not hold because variables enqueued at top level will not be reinserted in the heap assert(veci_size(&s->order) == var); diff --git a/src/sat/bsat/satSolver2.c b/src/sat/bsat/satSolver2.c index 0da59fda..1f46d88c 100644 --- a/src/sat/bsat/satSolver2.c +++ b/src/sat/bsat/satSolver2.c @@ -1296,6 +1296,7 @@ void sat_solver2_setnvars(sat_solver2* s,int n) #else s->activity[var] = (1<<10); #endif + s->model [var] = 0; // does not hold because variables enqueued at top level will not be reinserted in the heap // assert(veci_size(&s->order) == var); veci_push(&s->order,var); |