Sunday, September 4, 2011

Dependency graph visualization

The problem

In the case of real software projects, graphviz will come up with an incredible mess of interconnected nodes, which is nearly impossible to navigate. What can be done ?

Specialized graphviz browser

I serendipitously found the ZGRViewer tool, implemented in JAVA, which has features that are aimed directly at visualizing and browsing large graphviz graphs. The most useful features, for the time being, are only available in the unreleased SVN version though. The currently available version for download is somewhat useful, but I'm really waiting for version 0.9.0 to become available. It looks promising, but it remains to be seen if this will actually let us draw any conclusions from inspecting the graph. (For now, formulating prolog queries is a much more powerful tool to find out interesting facts about the source code under test.)

Different layout engine: circos

Not long after finding ZGRViewer, I found a potentially interesting alternative to graphviz in the form of circos. Circos has an interesting approach to visualizing large data tables (you had better refer to their website for details). It was rather easy to add some functionality in pycdep's prolog template that lets us export a set of dependencies as an adjacency matrix, which can then be visualized using the circos tableviewer utility script. Circos offers a huge amount of customization possibilities, and I haven't exactly delved into them. The drawing on top of this blog post, is the result of running circos with all default options on the STAF/STAX source code that I've been using in previous blog posts about pycdep. I'm certain I haven't even scratched the surface of what is possible with this fascinating tool.

No comments:

Post a Comment