Skip to content

Commit

Permalink
Merge pull request kind2-mc#1090 from daniel-larraz/bounds-free-const
Browse files Browse the repository at this point in the history
Store bounds of free constant arrays
  • Loading branch information
daniel-larraz authored Aug 22, 2024
2 parents ffb483d + 64b0cf2 commit 688b7a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lustre/lustreNodeGen.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2373,6 +2373,8 @@ and compile_const_decl ?(ghost = false) cstate ctx map scope = function
let vt, global_constraints =
X.fold over_index cty (X.empty, cstate.global_constraints)
in
let var_bounds = SVT.fold (fun k v a -> (k, v) :: a) !map.bounds [] in
List.iter (fun (k, v) -> SVT.add cstate.state_var_bounds k v) var_bounds;
if ghost then cstate
else (
{ cstate with
Expand Down
6 changes: 6 additions & 0 deletions tests/regression/falsifiable/free_const_array.lus
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const Ids: int^2;

node N() returns (ok: bool)
let
check Ids[0]=0;
tel

0 comments on commit 688b7a3

Please sign in to comment.