Commit 56cc5734 by Alan Mishchenko

Bug fix related to not properly resizing SAT solver's model array.

parent fadde52d
...@@ -1035,6 +1035,7 @@ void sat_solver_setnvars(sat_solver* s,int n) ...@@ -1035,6 +1035,7 @@ void sat_solver_setnvars(sat_solver* s,int n)
s->tags [var] = 0; s->tags [var] = 0;
s->orderpos[var] = veci_size(&s->order); s->orderpos[var] = veci_size(&s->order);
s->reasons [var] = 0; s->reasons [var] = 0;
s->model [var] = 0;
/* does not hold because variables enqueued at top level will not be reinserted in the heap /* does not hold because variables enqueued at top level will not be reinserted in the heap
assert(veci_size(&s->order) == var); assert(veci_size(&s->order) == var);
......
...@@ -1296,6 +1296,7 @@ void sat_solver2_setnvars(sat_solver2* s,int n) ...@@ -1296,6 +1296,7 @@ void sat_solver2_setnvars(sat_solver2* s,int n)
#else #else
s->activity[var] = (1<<10); s->activity[var] = (1<<10);
#endif #endif
s->model [var] = 0;
// does not hold because variables enqueued at top level will not be reinserted in the heap // does not hold because variables enqueued at top level will not be reinserted in the heap
// assert(veci_size(&s->order) == var); // assert(veci_size(&s->order) == var);
veci_push(&s->order,var); veci_push(&s->order,var);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment