Skip to content

Commit

Permalink
Merge pull request kind2-mc#1003 from lorchrob/subrange-bug
Browse files Browse the repository at this point in the history
Fix bug with subranges
  • Loading branch information
daniel-larraz authored Aug 31, 2023
2 parents 53827fb + 795c64e commit 7b00f55
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lustre/lustreTransSys.ml
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ let add_constraints_of_type init terms state_var =

(* Get bounds of integer range *)
let l, u =
(if Type.is_array state_var_type
(if Type.is_int_range state_var_type
then Type.bounds_of_int_range state_var_type
else Type.bounds_of_enum state_var_type |> (fun (a, b) -> Some a, Some b))
in
Expand Down
5 changes: 5 additions & 0 deletions tests/regression/success/subrange_bug.lus
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node main () returns (y: subrange [0, 7] of int);
let

check y <= 7;
tel;

0 comments on commit 7b00f55

Please sign in to comment.