Skip to content

Commit

Permalink
Remove some instances of Lib.dummy_pos
Browse files Browse the repository at this point in the history
  • Loading branch information
lorchrob committed Apr 29, 2024
1 parent 09f7af7 commit c01968b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lustre/lustreAstDependencies.ml
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ let extract_decls: 'a option IMap.t -> LA.ident list -> (('a list), [> error]) r


let split_contract_equations: LA.contract -> (LA.contract * LA.contract)
= fun (_, eqns) ->
= fun (p, eqns) ->
let split_eqns: (LA.contract * LA.contract) -> LA.contract_node_equation -> (LA.contract * LA.contract)
= fun ((p1, ps), (p2, qs)) -> fun e ->
match e with
Expand All @@ -630,7 +630,7 @@ let split_contract_equations: LA.contract -> (LA.contract * LA.contract)
| LA.Assume _
| LA.AssumptionVars _ -> (p1, ps), (p2, e::qs)
in
List.fold_left split_eqns ((Lib.dummy_pos, []), (Lib.dummy_pos, [])) eqns
List.fold_left split_eqns ((p, []), (p, [])) eqns

let rec vars_with_flattened_nodes: node_summary -> int -> LA.expr -> LA.SI.t
= fun m proj expr ->
Expand Down
6 changes: 3 additions & 3 deletions src/lustre/lustreDesugarAnyOps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fun ctx node_name fun_ids expr ->
let rec_call = desugar_expr ctx node_name fun_ids in
match expr with
| A.AnyOp (pos, (_, id, ty), expr1, expr2_opt) ->
let span = { A.start_pos = pos; A.end_pos = Lib.dummy_pos } in
let span = { A.start_pos = pos; A.end_pos = pos } in
let contract = match expr2_opt with
| None -> [A.Guarantee (AH.pos_of_expr expr1, None, false, expr1)]
| Some expr2 -> [A.Assume (AH.pos_of_expr expr2, None, false, expr2);
Expand Down Expand Up @@ -87,11 +87,11 @@ fun ctx node_name fun_ids expr ->
if has_pre_arrow_or_node_call then
A.NodeDecl (span,
(name, true, [], inputs,
[pos, id, ty, A.ClockTrue], [], [], Some (Lib.dummy_pos, contract)))
[pos, id, ty, A.ClockTrue], [], [], Some (pos, contract)))
else
A.FuncDecl (span,
(name, true, [], inputs,
[pos, id, ty, A.ClockTrue], [], [], Some (Lib.dummy_pos, contract)))
[pos, id, ty, A.ClockTrue], [], [], Some (pos, contract)))
in
A.Call(pos, name, inputs_call), [generated_node]

Expand Down

0 comments on commit c01968b

Please sign in to comment.