Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Honor --inline_arrays flag for arrays containing enumeration values #1100

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/lustre/lustreTransSys.ml
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,13 @@ let add_constraints_of_type init terms state_var =
List.fold_left
(fun acc (ty, iv) ->
match Type.node_of_type ty with
| Type.IntRange (Some i, Some j) when Flags.Arrays.inline () -> (
let cj = ref [] in
for x = (Numeral.to_int j) downto (Numeral.to_int i) do
cj := Term.mk_let [iv, Term.mk_num_of_int x] acc :: !cj
done;
Term.mk_and !cj
)
| Type.IntRange (Some i, Some j) -> (
let bounds =
Term.mk_leq
Expand Down
Loading