X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fgraphs%2Ftools%2Fsimplify_deps%2Fsimplify_deps.ml;h=0763d614974b35679a6993e06b23622c99a1c36c;hb=86ec68f575f6f781572d14d0aba9a98a860c94a6;hp=c924218cbdd54187974eeef7f9705c76b9bc4a9a;hpb=e85bc43c20254aa85463748eeb95e2e60ed0ccf1;p=helm.git diff --git a/helm/graphs/tools/simplify_deps/simplify_deps.ml b/helm/graphs/tools/simplify_deps/simplify_deps.ml index c924218cb..0763d6149 100644 --- a/helm/graphs/tools/simplify_deps/simplify_deps.ml +++ b/helm/graphs/tools/simplify_deps/simplify_deps.ml @@ -26,11 +26,11 @@ let reachable target source_arcs = ) false source_arcs ;; -let consider_arc (source,target) = +let consider_arc (source,target,rest) = let Node (source_name,source_arcs) = source in let Node (target_name,_) = target in if not (reachable target !source_arcs) then - print_endline (source_name ^ " -> " ^ target_name) + print_endline (source_name ^ " -> " ^ target_name ^ rest ^ ";") else if debug then print_endline (source_name ^ " -> " ^ target_name ^ " [color=green];") @@ -55,9 +55,10 @@ let parse () = try while true do let line = read_line () in - if Str.string_match (Str.regexp " \([^ ]*\) -> \(.*\);") line 0 then + if Str.string_match (Str.regexp " \([^ ]*\) -> \([^ ;]*\)\(\( \[.*\]\)?\);") line 0 then let source = Str.matched_group 1 line in let target = Str.matched_group 2 line in + let rest = Str.matched_group 3 line in let tar = try search_node target @@ -79,7 +80,7 @@ let parse () = nodes := sou :: !nodes ; sou in - arcs := (sou,tar)::!arcs + arcs := (sou,tar,rest)::!arcs else print_endline line done