Skip to content

Commit

Permalink
refactor(pkg): use [raise_notrace] when possible (#11299)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <[email protected]>
  • Loading branch information
rgrinberg authored Jan 14, 2025
1 parent 048f6a2 commit 92be370
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/0install-solver/sat.ml
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ module Make (User : USER) = struct
and two versions already selected. *)
if debug
then log_debug (Pp.text "CONFLICT: already selected " ++ name_lit l);
raise Conflict
raise_notrace Conflict
| Undecided ->
(* Since one of our lits is already true, all unknown ones
can be set to False. *)
Expand All @@ -475,7 +475,7 @@ module Make (User : USER) = struct
if debug
then
log_debug (Pp.text "CONFLICT: enqueue failed for " ++ name_lit (neg l));
raise
raise_notrace
Conflict (* Can't happen, since we already checked we're Undecided *))
| _ -> ());
true
Expand Down Expand Up @@ -508,7 +508,7 @@ module Make (User : USER) = struct
(* No point processing the rest of the queue as
we'll have to backtrack now. *)
Queue.clear problem.propQ;
raise (ConflictingClause clause))
raise_notrace (ConflictingClause clause))
done
done;
None
Expand Down Expand Up @@ -816,7 +816,7 @@ module Make (User : USER) = struct
| None ->
(* Everything is assigned without conflicts *)
(* if debug then log_debug "SUCCESS!"; *)
raise
raise_notrace
(SolveDone (Some (fun var -> Var_value.assignment_exn (lit_value var))))
in
let lit =
Expand Down Expand Up @@ -850,7 +850,7 @@ module Make (User : USER) = struct
if get_decision_level problem = 0
then (
if debug then log_debug (Pp.text "FAIL: conflict found at top level");
raise (SolveDone None))
raise_notrace (SolveDone None))
else (
(* Figure out the root cause of this failure. *)
let learnt, backtrack_level = analyse problem conflicting_clause in
Expand Down

0 comments on commit 92be370

Please sign in to comment.