Subdotter reads a graph in dot format and extracts the subgraph specified by a list of nodes and other options.
Subdotter is written in OCaml and based on the ocamlgraph library. It was developed in the Inria PARKAS team. The original motivation was to visualize chains and cycles in the dependency graphs of very large Lustre programs.
subdotter graph.dot
-
-i <path>
: specifies the input graph. This argument is required. -
-o <path>
: specifies where the output should be written. The default is to send it to stdout. -
--nodes <path>
: read the list of nodes to extract from the given file (the names can be separated by spaces, tabs, newlines, commas, or semicolons). -
--include-scc
: include as secondary nodes any others in the same strongly connected components as the given nodes. -
--successors <int>
: include as secondary nodes any that can be reached in the given number of steps from the given nodes. -
--predecessors <int>
: include as secondary nodes any that can be reached in the given number of backward steps from the given nodes. -
--external-edges
: add extra edges to represent paths between extracted nodes that pass via unextracted ones. This makes the calculation much slower since it is necessary to calculate transitive closures.
Using Opam:
opam install dune dune-build-info ocamlgraph
make