.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Analizo::Command::graph 3pm" .TH Analizo::Command::graph 3pm 2024-05-21 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME analizo\-graph \- dependency graph generator .SH USAGE .IX Header "USAGE" .Vb 1 \& analizo graph [OPTIONS] [ [ ...]] .Ve .SH DESCRIPTION .IX Header "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 \fBgraphviz\fR\|(1) format. .PP analizo graph is part of the analizo suite. .SH "REQUIRED ARGUMENTS" .IX Header "REQUIRED ARGUMENTS" .IP ... 4 .IX Item "..." The input directories (or files) with source code to be processed. .Sp 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. .SH OPTIONS .IX Header "OPTIONS" .IP "\-\-omit " 4 .IX Item "--omit " Omit the given functions from the call graph. Multiple function names may be given separated by commas. .IP \-\-cluster 4 .IX Item "--cluster" Cluster the functions into files, so you can see in which files are the calling and called functions. .IP \-\-modules 4 .IX Item "--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). .Sp It doesn't make much sense to use \-\-modules together with \-\-cluster. .IP "\-\-extractor " 4 .IX Item "--extractor " Define which extractor method use to parse the source code. Currently "Doxyparse" is the only extractor available. Default is Doxyparse. .IP "\-\-output , \-o " 4 .IX Item "--output , -o " Use a file as output .SH "VIEWING THE GRAPH" .IX Header "VIEWING THE GRAPH" To view the generated graph, pipe analizo's output to one of the Graphviz tools. You can use \fBdotty\|(1)\fR to display the graph in a X11 window: .PP .Vb 1 \& $ analizo graph src/ | dotty \- .Ve .PP You can also generate a file to print or include in a document by using the \fBdot\|(1)\fR. .PP To generate a PNG image called \fIgraph.png\fR: .PP .Vb 1 \& $ analizo graph src/ | dot \-Tpng \-ograph.png \- .Ve .PP To generate a PostScript version of the dependency graph for printing, you can also use the \fBdot\fR. For example, to generate a dependency graph in the file \&\fIgraph.ps\fR fitting everything on a US letter size page in landscape mode, try .PP .Vb 1 \& $ analizo graph src/ | dot \-Grotate=90 \-Gsize=11,8.5 \-Tps \-o graph.ps .Ve .PP Sometimes, the graph will fit better if the dependencies arrows go from left to right instead of top to bottom. The \fBdot\fR option \fB\-Grankdir=LR\fR will do that: .PP .Vb 1 \& $ analizo graph src/ | dot \-Gsize=8.5,11 \-Grankdir=LR \-Tps \-o graph.ps .Ve .PP For large software, the graph may end up too small to comfortably read. If that happens, try N\-up printing: .PP .Vb 1 \& $ analizo graph src/ | dot \-Gpage=8.5,11 \-Tps \-o graph.ps .Ve .PP You can also try playing with other \fBdot\fR options such as \fB\-Gratio\fR, or for a different style of graph, try using \fBneato\fR instead of \&\fBdot\fR. See the Graphviz documentation for more information about the various options available for customizing the style of the graph. .SH "READING THE GRAPH" .IX Header "READING THE GRAPH" When generating a graph in the function level (i.g. without the \fI\-\-modules\fR 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. .PP When the \fI\-\-modules\fR option is on, then there are only solid arrows. An arrow from \fIA\fR to \fIB\fR means that \fIA\fR depends on \fIB\fR. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fBdotty\|(1)\fR, \fBdot\|(1)\fR, \fBneato\|(1)\fR, \fBanalizo\|(1)\fR .SH "COPYRIGHT AND AUTHORS" .IX Header "COPYRIGHT AND AUTHORS" See \fBanalizo\|(1)\fR.