Skip to content

Commit

Permalink
Do not assume dummy node id exists
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-larraz committed Oct 6, 2023
1 parent d369411 commit f81c873
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lustre/lustreAbstractInterpretation.ml
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,11 @@ let rec interpret_global_consts ty_ctx decls =
Res.seq_ (check_global_const_subrange ty_ctx ctx pos_map)

and check_global_const_subrange ty_ctx ctx pos_map =
let ctx = IMap.find dnode_id ctx in
let ctx =
match IMap.find_opt dnode_id ctx with
| None -> empty_context
| Some ctx -> ctx
in
IMap.fold (fun id inferred_range acc ->
let actual_ty = Ctx.lookup_ty ty_ctx id |> get in
let actual_ty = Ctx.expand_nested_type_syn ty_ctx actual_ty in
Expand Down

0 comments on commit f81c873

Please sign in to comment.