Skip to content

Commit

Permalink
Use get_var_values to get model in certifChecker
Browse files Browse the repository at this point in the history
Previously, models were retrieved using get-model, which could cause issues when
minimizing invariants for Lustre models with arrays encoded as values of
an uninterpreted sort, FArray, with arity 2.
If the Lustre model includes arrays for two different element types (e.g.,
FArray Int Bool and FArray Int Int), Z3 returns models where the universes for
FArray Int Bool and FArray Int Int may contain constants with
the same name (e.g. FArray!val!3).
  • Loading branch information
daniel-larraz committed Sep 27, 2024
1 parent fd7e8ab commit f3fced0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/certif/certifChecker.ml
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,12 @@ let rec cherry_pick solver trans
(* Not enough invariants *)

(* Get the full model *)
let model = SMTSolver.get_model solver in
let model =
SMTSolver.get_var_values
solver
(TransSys.get_state_var_bounds trans)
(TransSys.vars_of_bounds trans Numeral.zero Numeral.one)
in

(* Evaluation function. *)
let eval term =
Expand Down

0 comments on commit f3fced0

Please sign in to comment.