Skip to content

Commit

Permalink
utils/Dot_output: fixed bug in graph reduction
Browse files Browse the repository at this point in the history
  • Loading branch information
pveber committed Jan 8, 2019
1 parent 019bac3 commit 2544ec0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/utils/dot_output.ml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,11 @@ module G = struct
| List_nth _ -> false
| Glob _ -> false


let reduce_to_paths g =
let foreach_vertex v acc =
if is_path v then acc else (
let f p acc = fold_succ (fun s acc -> add_edge acc p s) g p acc in
fold_pred f g v (remove_vertex g v)
let f p acc = fold_succ (fun s acc -> add_edge acc p s) acc v acc in
remove_vertex (fold_pred f acc v acc) v
)
in
fold_vertex foreach_vertex g g
Expand Down

0 comments on commit 2544ec0

Please sign in to comment.