The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

analizo-graph - dependency graph generator

USAGE

  analizo graph [OPTIONS] <input> [<input> [<input> ...]]

DESCRIPTION

analizo graph reads the dependency information from one or more source code directories passed as arguments, and produces as output the graph of dependencies between the modules of the software in the graphviz(1) format.

analizo graph is part of the analizo suite.

REQUIRED ARGUMENTS

<input>...

The input directories (or files) with source code to be processed.

Although you can pass individual files as input, this tool is more useful if you pass entire source directories. If you pass just a couple of files, their dependencies on modules that are not declared and/or implemented in those files will not be calculated.

OPTIONS

--omit <functions>

Omit the given functions from the call graph. Multiple function names may be given separated by commas.

--cluster

Cluster the functions into files, so you can see in which files are the calling and called functions.

--modules

Group the functions by modules (files or OO classes), and only represent calls between modules. This is useful to see the dependencies between the modules of the program, instead of focusing on specific functions. The arrows between the modules will be labelled with a number that represents the number of different places in which the calling module calls functions in the called module (i.e. how many times module A calls module B).

It doesn't make much sense to use --modules together with --cluster.

--extractor <extractor>

Define which extractor method use to parse the source code. Currently "Doxyparse" is the only extractor available. Default is Doxyparse.

--output <file>, -o <file>

Use a file as output

VIEWING THE GRAPH

To view the generated graph, pipe analizo's output to one of the Graphviz tools. You can use dotty(1) to display the graph in a X11 window:

  $ analizo graph src/ | dotty -

You can also generate a file to print or include in a document by using the dot(1).

To generate a PNG image called graph.png:

  $ analizo graph src/ | dot -Tpng -ograph.png -

To generate a PostScript version of the dependency graph for printing, you can also use the dot. For example, to generate a dependency graph in the file graph.ps fitting everything on a US letter size page in landscape mode, try

  $ analizo graph src/ | dot -Grotate=90 -Gsize=11,8.5 -Tps -o graph.ps

Sometimes, the graph will fit better if the dependencies arrows go from left to right instead of top to bottom. The dot option -Grankdir=LR will do that:

  $ analizo graph src/ | dot -Gsize=8.5,11 -Grankdir=LR -Tps -o graph.ps

For large software, the graph may end up too small to comfortably read. If that happens, try N-up printing:

  $ analizo graph src/ | dot -Gpage=8.5,11 -Tps -o graph.ps

You can also try playing with other dot options such as -Gratio, or for a different style of graph, try using neato instead of dot. See the Graphviz documentation for more information about the various options available for customizing the style of the graph.

READING THE GRAPH

When generating a graph in the function level (i.g. without the --modules option), function calls are displayed as solid arrows. A dotted arrow means that the function the arrow points from takes the address of the function the arrow points to; this typically indicates that the latter function is being used as a callback.

When the --modules option is on, then there are only solid arrows. An arrow from A to B means that A depends on B.

SEE ALSO

dotty(1), dot(1), neato(1), analizo(1)

COPYRIGHT AND AUTHORS

See analizo(1).