let add_loc l_loc loc info merge =
let rec add lst = match lst with
| [] -> [(loc, info)]
| (l, e)::tl ->
if Locations.Zone.equal l loc then
let new_e = merge e info in (loc, new_e)::tl
else
begin
(*
if (Locations.Zone.intersects l loc) then
begin
Format.printf "[pdg] implicit inputs intersect : %a and %a\n"
Locations.Zone.pretty l Locations.Zone.pretty loc;
assert false
end;
*)
(l, e)::(add tl)
end
in add l_loc