Skip to content

Commit

Permalink
Use an adt to save the results of queries (bis)
Browse files Browse the repository at this point in the history
  • Loading branch information
Halbaroth committed Sep 4, 2023
1 parent e9affab commit 4d381e8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/bin/common/solving_loop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ let main () =
Options.Time.set_timeout (Options.get_timelimit ());
end;
SAT.reset_refs ();
let partial_model, consistent, _ =
let _, consistent, _ =
List.fold_left
(FE.process_decl FE.print_status used_context consistent_dep_stack)
(SAT.empty (), true, Explanation.empty) cnf
(SAT.empty (), `Unknown (SAT.empty ()), Explanation.empty) cnf
in
if Options.get_timelimit_per_goal() then
Options.Time.unset_timeout ();
Expand All @@ -96,9 +96,10 @@ let main () =
(* If the status of the SAT environment is inconsistent,
we have to drop the partial model in order to prevent
printing wrong model. *)
if consistent then
match consistent with
| `Sat partial_model | `Unknown partial_model ->
Some partial_model
else None
| `Unsat -> None
with Util.Timeout ->
if not (Options.get_timelimit_per_goal()) then exit 142;
None
Expand Down

0 comments on commit 4d381e8

Please sign in to comment.