X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fextlib%2FgraphvizPp.ml;h=ed5bbdc54c69c1d1557a43635d72bd4c2a4f1ca3;hb=33a4938d5ce3a5c240c0d35b6362c8072f8ba482;hp=4804699e0a7ef048dae9851641411e7e768be6e5;hpb=22df969cb0629a8d6ea09534386279807ff02f1c;p=helm.git diff --git a/helm/software/components/extlib/graphvizPp.ml b/helm/software/components/extlib/graphvizPp.ml index 4804699e0..ed5bbdc54 100644 --- a/helm/software/components/extlib/graphvizPp.ml +++ b/helm/software/components/extlib/graphvizPp.ml @@ -30,6 +30,7 @@ type attribute = string * string (* pair *) module type GraphvizFormatter = sig val header: + ?graph_type:string -> ?name:string -> ?graph_attrs:(attribute list) -> ?node_attrs:(attribute list) -> ?edge_attrs:(attribute list) -> Format.formatter -> @@ -55,8 +56,8 @@ module Dot = attributes attrs fmt; fprintf fmt "];@]@," - let header ?(name = "g") ?(graph_attrs = []) ?node_attrs ?edge_attrs fmt = - fprintf fmt "@[strict digraph %s {@," name; + let header ?(graph_type = "digraph") ?(name = "g") ?(graph_attrs = []) ?node_attrs ?edge_attrs fmt = + fprintf fmt "@[%s %s {@," graph_type name; List.iter (fun (k, v) -> fprintf fmt "@[%s=@,%s;@]@," k v) graph_attrs; (match node_attrs with @@ -68,7 +69,7 @@ module Dot = let node = node ~quote:true let edge name1 name2 ?(attrs = []) fmt = - fprintf fmt "@[\"%s\" ->@ \"%s\"@ [" name1 name2; + fprintf fmt "@[%s ->@ %s@ [" name1 name2; attributes attrs fmt; fprintf fmt "];@]@," let raw s fmt = pp_print_string fmt s