Releasing Boost Dependency Analyzer 1.1

published at 09.08.2013 13:48 by Jens Weller
Save to Instapaper Pocket

A few weeks ago I released the first version of my tool to analyze the boost libraries. This is now the release of version 1.1, which comes with a couple of enhancements. New main features are a configuration dialog, the ability to filter edges and nodes, and the ability to choose between two different sources for the libraries in boost. But first, thank you for the feedback, some of it has inspired the new features.

When writing such a tool, its always the question, when to release it. I released maybe early, as some features such as configuration was missing. But I wanted to release early for a simple reason: discussion and feedback. Also I wanted the few people out there, who really need this tool, to have it as soon as possible. With the modularization and git, this might be useful, also over the mailing list I learned it might be helpful for linux distributions. I created the tool based on 3 main motivations:

Now, with the last reason, there was a lot of good feedback from the boost mailinglist, some things I had planned before, filtering f.e. the filtering after library names. Now, you also can filter after edge properties, which are header, source/library, documentation and test. These options will not make it easier to read the big graphs in my opinion, but help in filtering in the smaller graphs. Also its not perfect, the header-only graph of boost looks very different from the full dependency version, but still has the same pattern.

This brings me to the graphs, which are often very dense. This is because the tool can only display the max dependencies. So, its ALL the dependencies, a lot of boost libraries support other boost libs, which turns into a dependency if you use that library. Otherwise, you probably will not have it as this. As bcp is the source for all dependencies, this tool diplays the view from bcp on boost and its dependencies. As the purpose of this tool is to rip out the part of boost that has dependencies with your desired boost library, its always max dependencies. So, at least for now, there is no way to get to min dependencies. The filtering is a first step in this direction.

New Features

A short view on the new features implemented in this version. Lets start with the configuration dialog:

../../files/blog/bda/bpaconfigdlg.png

This dialog has two tabs, one for the general options, which are the choice of using maintainers.txt or libraries.xml as the source for the boost library names. And the option to preselect the path of the bcp tool, as this usually does not change. This way when generating a bunch of databases for different versions of boost you don't have to reselect the position of bcp each time. This was especially annoying while testing.

The second tab features the filters, of which there is the named filter, which will filter a library from the graphview by name. Except, you want to view that library. Also, there is now an edge type which allows filtering, so you can select which types of connections between libraries you want to see.

A very good feedback from the boost mailinglist was the existence of libraries.xml, where most libraries are listed. It is the source for the library overview list on boost.org. As far as I know its not being distributed with boost, so that I have to download it from the website. By implementing this feature I saw that neither maintainers.txt nor libraries.xml is perfect. So one bugfix that is currently applied, is adding some library names to the list manually. One of the problems with libraries.xml is for example that some library names don't match the expectation from bcp, sometimes its "utility/foo" which works, but "utility/bar" fails, while "bar" works. Another example is disjoint_sets, which is only in maintainers.txt listed. So, yet there is no perfect source for the library names, so I decided to make this an option. This also allows to get different views on boost, and having no network access, you still can fallback on maintainers.txt.

Results

So, what are the results for this tool so far? First, I have learned a lot about dependencies, also the maintainers.txt file had some libraries missing or even duplicates, which now can be fixed. So first result is putting some light into places like maintainers.txt and libraries.xml. With libraries.xml I noticed that some duplicates exist, but I'm not sure how this file is maintained or created. A feature I have not yet mentioned is the following one:

{{image::../../files/blog/bda/boostdepbargraph.png?width=600&mode=proportional&rel=lightbox}}

No, not a bargraph export, but the tool is now able export a csv file of libraries and their dependency number. Your favored Office Application will be able to turn this into a bargraph as the above. This shows also, how the (max!) dependencies are distributed among boost. This version is a bit better readable then the dependency graph. The red bar is the average, which is currently around 20.

Also, the dependency graph for boost now looks slightly different:

{{image::../../files/blog/bda/boost154_libxml.png?width=600&mode=proportional&rel=lightbox}}

The dependency graph is the main result of my work on this tool. It takes a little time to understand it fully, and to be able to read it. The center is the part of boost that is widely used by other libraries, or how somebody on reddit phrased it "everything in the center is worth looking at". Also, for me, the main value is not exporting the main graph into a picture, but to be able to understand the dependencies of libraries in boost. Selecting a library in the boost dependency analyzer tool will also select all its dependencies.

Licensing

As I already wrote at the first release, I have the plan to release this tool sooner and more likely later as GPL. Also using the software is free, as I have never build this piece of software in the mind of selling it. For now, the tool is mostly done, I'll soon start with a different tool, which a more complex setting and a more commercial mindset. I'll might make for this tool a update licence available, which would help to get the funding for enhancing this tool in the future. As a benefit you would get mailed the updates instead of needing to download them. But this will always be optional.

Download

The downloads, this time you have 3 different choices, there all for Windows:

Simply unzip all files in the same directory and you're ready to go.

 

Join the Meeting C++ patreon community!
This and other posts on Meeting C++ are enabled by my supporters on patreon!