Skip to content

Commit

Permalink
fix(CDCL): Semantic splits are always relevant (#1118)
Browse files Browse the repository at this point in the history
Restore semantic splitting functionality introduced in #1027 and broken
by #1041.
  • Loading branch information
bclement-ocp authored May 13, 2024
1 parent 812fd86 commit 1ee2882
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/lib/reasoners/satml.ml
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,15 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
with Not_found -> ()
done

(* Variables are relevant if they are in the [lazy_cnf]. Semantic variables
are always relevant: otherwise, since they are local to the current branch
and not added to the [var_order], they would never get decided.
Only used when [Options.get_cdcl_tableaux_inst ()] is enabled. *)
let is_relevant env (v : Atom.var) =
is_semantic v.pa ||
Matoms.mem v.pa env.lazy_cnf || Matoms.mem v.na env.lazy_cnf

(* annule tout jusqu'a lvl *exclu* *)
let cancel_until env lvl =
if Options.get_debug_sat () then
Expand Down Expand Up @@ -737,9 +746,7 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
heap. *)
if Options.get_cdcl_tableaux_inst () then
VH.filter_map_inplace (fun v () ->
if
Matoms.mem v.pa env.lazy_cnf || Matoms.mem v.na env.lazy_cnf
then (
if is_relevant env v then (
insert_var_order env v; None
) else
Some ()
Expand Down Expand Up @@ -1788,7 +1795,7 @@ module Make (Th : Theory.S) : SAT_ML with type th = Th.t = struct
Note that we can only do this if [get_cdcl_tableaux_inst ()] is [true],
because otherwise instantiation requires a complete boolean model. *)
if Matoms.mem v.pa env.lazy_cnf || Matoms.mem v.na env.lazy_cnf then
if is_relevant env v then
make_decision env atom
else (
VH.add env.irrelevants v ();
Expand Down

0 comments on commit 1ee2882

Please sign in to comment.