valag project
Valag is a graphviz graph generator for Vala source files.
Latest version is 1.2. Grab the sources: valag-1.2.tar.gz.
You can browse and clone the code at the git development repository
usage
Command line syntax of valag is similar to valac, except for extra valag related options:
- --concentrate → enables an edge merging technique to reduce clutter in dense layouts of directed graphs
- --format → graphviz output format, default is "xdot" to be used with the xdot.py program distributed with valag
- --prefix → prepend the given prefix to the output filenames
In the generated graph TypeSymbols are rounded nodes, while dashed edges are weak references.
Generated files:
- valainitial → codenode graph right after the parsing process
- valaresolved → generated after the symbol resolver
- valaanalyzer → after the semantic analyzer
- valaflow → puts emphasis on control flow basic blocks
install
Requirements: build-essential, libgraphviz-dev and libvala-dev (0.11.x version).
First compile valag by typing `make'.
To install valag under /usr/local/bin type `make install' as root. If you want to change the installation directory (e.g. under /usr/bin) type `make install DESTDIR=/usr'. Notice that this process will not install xdot.py.
screenshots
Source code reference:
namespace Test
{
public class TestClass
{
public int myprop { get; set; }
}
}
public static void main ()
{
var test = new Test.TestClass();
while (test.myprop < 3)
{
test.myprop++;
}
}
Vala initial graph
After symbol resolver
After semantic analyzer
Control flow blocks




