[bugfix?] Avoid forgetting theory conflict clauses

When theory raises a conflict, it is analysed, and the backtracck clause
that result is added to the solver, however, I didn't find yet a
satisfying answer as to wether the original clause is implied (or not)
by this backtrack clause, so in order not to lose information, we also
add the original conflict clause when it comes from the theory (because
if not, then it comes from a conflict detected during propgation, so the
conflict clause is actually already attached).
This commit is contained in:
Guillaume Bury 2016-11-22 17:04:18 +01:00
parent 9a393c130a
commit 3124d55209

View file

@ -1006,7 +1006,14 @@ module Make
match propagate () with
| Some confl -> (* Conflict *)
incr conflictC;
add_boolean_conflict confl
(* When the theory has raised Unsat, add_boolean_conflict
might 'forget' the initial conflict clause, and only add the
analyzed backtrack clause. So in those case, we use add_clause
to make sure the initial conflict clause is also added. *)
if confl.attached then
add_boolean_conflict confl
else
add_clause confl
| None -> (* No Conflict *)
assert (env.elt_head = Vec.size env.elt_queue);