let next_edge cfg n =
let edges = match node_type n with
| VblkIn _ | Vswitch _ | Vtest _ | Vloop _ ->
let edges = CFG.succ_e cfg.graph n in
List.filter (fun e -> (edge_type e) = Enext) edges
| Vcall _ ->
let en, _ee = get_call_out_edges cfg n in [en]
| Vstmt _ ->
let edges = match CFG.succ_e cfg.graph n with
| (([] | _::[]) as edges) -> edges
| edges ->
List.filter (fun e -> (edge_type e) = Enext) edges
in edges
| _ ->
debug "[next_edge] not found for %a@." pp_node n;
raise Not_found
in
match edges with
| [] -> raise Not_found
| [e] -> e
| _ -> Wp_parameters.fatal "several (%d) Enext edges to node %a"
(List.length edges) pp_node n