Skip to content

Commit

Permalink
Drop the SAT environment if its status is inconsistent.
Browse files Browse the repository at this point in the history
  • Loading branch information
Halbaroth committed Jul 18, 2023
1 parent 27c220a commit 0b4e288
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/bin/common/solving_loop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ let main () =
Options.Time.set_timeout (Options.get_timelimit ());
end;
SAT.reset_refs ();
let partial_model, _, _ =
let partial_model, consistent, _ =
List.fold_left
(FE.process_decl FE.print_status used_context consistent_dep_stack)
(SAT.empty (), true, Explanation.empty) cnf
Expand All @@ -93,7 +93,12 @@ let main () =
(Steps.get_steps ())
(Signals_profiling.get_timers ())
(Options.Output.get_fmt_err ());
Some partial_model
(* 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
Some partial_model
else None
with Util.Timeout ->
if not (Options.get_timelimit_per_goal()) then exit 142;
None
Expand Down

0 comments on commit 0b4e288

Please sign in to comment.