Closed shnarazk closed 6 years ago
The true order of literals in a conflicting binary clause can be determined with two calls of valueLit
. Therefore we don't need to allocate a new clause after each conflict.
bWatches
, which type, however, is identical to watches
.That's all.
data Clause = ... | BiClause Lit Lit | ... - as is
data Solver = Solver {
biWatches :: Vec -- extensible chain of (blocker, index) for BiClause
...
getNth bWatches $ div n 2
returns n-th BiClause's blockergetNth bWatches $ div n 2 + 1
returns n-th BiClause's index for biWatches
propagate
, biWatches
should be handled before watches
, as glucose does.propagat
e doesn't need to allocate a new BiClause
for a return value.
related: #51