glucose2: Create initial extra jlevel entries

My understanding is that jlevel needs to have this extra space as there
is existing code that assumes it is safe to index into it at index
decisionLevel()+1.
This commit is contained in:
Jannis Harder 2024-08-19 14:08:11 +02:00
parent 1e02c4327c
commit d1aa15b0c8
1 changed files with 6 additions and 0 deletions

View File

@ -187,6 +187,9 @@ Solver::Solver() :
travId = 0;
travId_prev = 0;
jlevel.push(-1);
jlevel.push(-1);
// allocate space for clause interpretation
vec<Lit> tmp; tmp.growTo(3);
itpc = ca.alloc(tmp);
@ -1911,6 +1914,9 @@ void Solver::reset()
jlevel .shrink_(jlevel.size());
jnext .shrink_(jnext.size());
jlevel.push(-1);
jlevel.push(-1);
//var2FaninLits.shrink_(var2FaninLits.size());
var2NodeData .shrink_(var2NodeData .size());
var2Fanout0 .shrink_(var2Fanout0 .size());