the older DPLL approach, which does not suffer from
that problem.
3.5 DPLL Case
In a DPLL-like solver, when the two children of a
node corresponding to interpretation I have been ex-
plored (one branch for decision l, another one for de-
cision ¬l) and both were unsatisfiable, F
|I
is known
to be unsatisfiable and the sources S(F, I) can be ob-
tained as presented in Section 3.3. S(F,I) simplified
by I is unsatisfiable and is added to the cache. When
a new node identified by interpretation I is explored,
the first step is to look up in the cache if there ex-
ists an entry E which is contained in the current for-
mula F
|I
up to a renaming of literals. If there exists
E in the cache and σ a renaming of literals such that
σ(E) ⊆ F
|I
, then F
|I
is necessarily unsatisfiable since
E is unsatisfiable. This test can be translated to the
subgraph isomorphism problem (see Section 3.2). If
one is found, the set F
′
of clauses of F
|I
that map
to clauses of E is easily obtained by mapping back
nodes to clauses. F
′
|I
is unsatisfiable but in general
F
′
may be satisfiable. Indeed, F
′
has to be supple-
mented with the clauses required to propagate liter-
als erased in F
′
at the current decision level to ob-
tain an unsatisfiable formula. As an example, let us
assume a PHP problem P is encoded with clauses
{C
1
,C
2
,.. .,C
n
} and let us consider the formula F de-
fined as {¬x ∨ y,¬x ∨ ¬y,x ∨ C
1
,C
2
,.. .,C
n
}. Let us
also assume the PHP instance P is already present
in the cache. Starting from F, when we branch on
y, ¬x is propagated, and the simplified formula now
contains P which is recognized as an entry of the
cache. The clauses of F corresponding to P are
F
′
= {x ∨C
1
,C
2
,.. .,C
n
}. When branching on ¬y, we
also obtain F
′
= {x ∨C
1
,C
2
,.. .,C
n
} in the same way.
However, F
′
is satisfiable because the first clause of
P can be neutralized by x. To recover an unsatis-
fiable formula, we have to add all the clauses used
to propagate ¬x on both branches, which means we
must add {¬x ∨ y, ¬x ∨ ¬y} to F
′
to get an unsatisfi-
able formula, which is the source S(F,
/
0) and there-
fore F can now be added as an entry in the cache.
It must be emphasized that looking up in the cache
has a high cost: we are solving several times an NP-
complete problem. However, since our goal is not
to speed up the resolution time but instead to reduce
the size of the search tree, it is acceptable to spend a
long time in looking up the cache if, in the end, the
generated tree is small enough. When a new entry is
added in the cache, we can use the greatest decision
level present in the sources to perform a backjump.
The idea here is to avoid backtracking to the deci-
sions that were not involved in the conflict. These
nodes would give us the same entry to add in the
cache as the current one. We can then go back to
the decision level found that way. If we are back to
a decision that has not been flipped already, we flip
that decision and otherwise, we add another new en-
try to the cache and we repeat this procedure. As
an example, let us consider a formula that contains
clauses {a ∨ b ∨ c,a ∨ b ∨ ¬c,a ∨ ¬b ∨ c,a ∨ ¬b ∨ ¬c}
and the interpretation I = ⟨¬a,x, y, z⟩. Then branch-
ing on b and ¬b will both yield a conflict, which
means that F
|I
is unsatisfiable as well as S(F,I) =
{a ∨ b ∨ c,a ∨ b ∨ ¬c,a ∨ ¬b ∨ c,a ∨ ¬b ∨ ¬c}. As
long as a is not flipped, these unsatisfiable clauses
remain in the formula, therefore we may backtrack
to decision level 1. Note that, even if this backjump
technique is similar to the conflict analysis of CDCL
solvers, there are still some differences. First we do
not perform any resolution step, hence have no cut
in the implication graph (UIP). Second, we are only
allowed to skip the subtrees that are known to be un-
satisfiable. Another difference here is the fact that the
clauses used during a conflict analysis are an explana-
tion of the learned clause whereas the sources are an
explanation of the unsatisfiability of the subformula.
4 EXPERIMENTAL RESULTS
We implemented the proposed approaches on top of
Minisat (E
´
en and S
¨
orensson, 2003). We disabled
database simplification to keep the original clauses
during the whole search. We also disabled restarts
which build a sequence of search trees. For the DPLL
approach, we also disabled clause learning and con-
flict analysis. The latter is replaced by a dedicated
procedure used to collect the sources. The activity
of a variable, which is updated for each new learned
clause in classical CDCL solver, is updated each time
a new clause is added to the sources in our con-
text. For the CDCL approach, we have both the con-
flict analysis procedure and the sources computation
procedure (the heuristics and clause learning is un-
changed compared to Minisat). The Glasgow Sub-
graph Solver (GSS for short) (McCreesh et al., 2020)
is called to compute subgraph isomorphism, i.e. to
query our cache. We used benchmarks from the the
SAT’02 (submitted part) (Simon et al., 2005) and
SAT’03 (handmade and industrial parts) (Le Berre
and Simon, 2003) competitions. We selected those
benchmarks because we needed “easy” benchmarks
for Minisat since our approach has a high computa-
tional complexity. A summary of our results is found
in Table 1. Minisat is obviously much more effi-
ICAART 2023 - 15th International Conference on Agents and Artificial Intelligence
362