DepAn: A Dependency Analysis Tool

Wednesday, September 10, 2008

Has your elegant little application turned into a crushing behemoth, with spaghetti code and a hairball of interdependencies? You know it has got to be simpler, but where to start?

DepAn is an experiment to better visualize and control dependencies in large applications. Once a project grows beyond a few dozen components, simple diagrams rarely capture the essential complexities of the project. Any analysis needs to carefully select the appropriate entities and the different dependencies that exist between them. Worse, these analysis sets change dramatically for different types of analyzes.

Traditional analysis tools tend to focus on a few specific forms of analysis: reference and call dependencies are used to find unused variables, method packaging defines different complexity measures. Other tools, such asUML, are appropriate for design work but present challenges for understanding existing work.

For DepAn, we based the application on a simple, generic model that can feed data into many different kinds of analysis. Projects are modeled as generic dependency graphs, with many different node and relation types. For example, the Java module uses 6 different node types and 24 different relations. These entities provide class-member level details for both packaging and reference analyzes. And since these interactions can be visualized simultaneously, you can see how to clean up your code based on both types of information.

On top of this basic model, we've added a variety of direct manipulation tools to select and display this dependency information in powerful and productive forms. The application's UI framework is built on the Eclipse Rich Client Platform (RCP), providing a powerful and familiar look-and-feel for engineers. Selecting the nodes and redrawing the dependancy graph is done with just a few clicks of the mouse.

Still coming are more supported languages, more powerful analysis metrics, and better tools for restructuring applications. Today,DepAn supports dependency graphs for Java and File-system projects. Soon, we should have additional modules for other popular languages, including C/C++, JavaScript, and Python. Today, the analyzes tab provides simple node level details. Soon, it should provide a variety of graph-level metrics. Today, the restructuring component allows some nodes to be called out. Soon, it should provide full re-allocation of components, and historical comparison of evolving architectures.

We welcome contributions for these and other features! Keep tabs on our progress and let us know what you think on the DepAn mailing list.