Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(CDCL): Semantic splits are always relevant #1118

Merged
merged 1 commit into from
May 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/lib/reasoners/satml.ml
Original file line number Diff line number Diff line change
@@ -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
@@ -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 ()
@@ -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 ();