Skip to content

Commit

Permalink
Do not add proof obligation for subrange free constants
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-larraz committed Nov 16, 2024
1 parent 003d114 commit f7c3585
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lustre/lustreAstNormalizer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1194,19 +1194,19 @@ and normalize_node info map
let gids7 = locals
|> List.filter (function
| A.NodeVarDecl (_, (_, id, _, _))
| A.NodeConstDecl (_, FreeConst (_, id, _))
| A.NodeConstDecl (_, TypedConst (_, id, _, _)) ->
let ty = get_type_of_id info node_id id in
Ctx.type_contains_subrange ctx ty || Ctx.type_contains_ref ctx ty
| A.NodeConstDecl (_, FreeConst _)
| A.NodeConstDecl (_, UntypedConst _) -> false)
|> List.fold_left (fun acc l -> match l with
| A.NodeVarDecl (p, (_, id, _, _))
| A.NodeConstDecl (p, FreeConst (_, id, _))
| A.NodeConstDecl (p, TypedConst (_, id, _, _)) ->
let ty = get_type_of_id info node_id id in
let ty = AIC.inline_constants_of_lustre_type info.context ty in
let gids = union acc (mk_fresh_subrange_constraint Local info p (Some node_id) id ty)
in union gids (mk_fresh_refinement_type_constraint Local info p (A.Ident (p, id)) ty)
| A.NodeConstDecl (_, FreeConst _)
| A.NodeConstDecl (_, UntypedConst _)-> assert false)
(empty ())
in
Expand Down

0 comments on commit f7c3585

Please sign in to comment.