Skip to content

Commit

Permalink
refactor(sat): reuse conflict variables set (#11415)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Jan 29, 2025
1 parent e1fd4a6 commit 3727dca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/sat/sat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ module Make (User : USER) = struct
; mutable trail_lim_len : int
; mutable toplevel_conflict : bool
; mutable set_to_false : bool
; conflict_vars : VarID.Hash_set.t
(* we are finishing up by setting everything else to False *)
}

Expand Down Expand Up @@ -233,6 +234,7 @@ module Make (User : USER) = struct
; trail_lim_len = 0
; toplevel_conflict = false
; set_to_false = false
; conflict_vars = VarID.Hash_set.create ()
}
;;

Expand Down Expand Up @@ -713,7 +715,10 @@ module Make (User : USER) = struct
(* The general rule we're learning *)
let btlevel = ref 0 in
(* The deepest decision in learnt *)
let seen = VarID.Hash_set.create () in
let seen =
VarID.Hash_set.clear problem.conflict_vars;
problem.conflict_vars
in
(* The variables involved in the conflict *)
let counter = ref 0 in
(* The number of pending variables to check *)
Expand Down

0 comments on commit 3727dca

Please sign in to comment.