Software Engineering

It's not over after shipping: Tools for Software Comprehension

  • Software
  • Software Tools
  • Software Evolution
  • Software Comprehension



Complex and large are two keywords that characterize today's software systems. The task of maintaining large and complex software becomes more difficult when the developers responsible for its maintenance are not familiar with its code; i.e., do not comprehend the software [1].

Using tools that aid developers comprehend a system can facilitate the maintenance process. However, What types of software comprehension tools are available? What are some examples of software comprehension tools?

Welcome to the third, and last part, of this series. In the first part, I discussed the concept of software maintenance, its importance, and its challenges. In the second part, I discussed the role of revere engineering for comprehending a system as well as the importance of software comprehension as a pre-requisite for software maintenance. In this series, we will continue discussing the topic of software comprehension but focused on the tools that can help developers comprehend a system.

Software Comprehension Layers

The process of comprehending a software involves analyzing various software layers. Some of those layers include documentation, architecture, and source code. Regardless if it is done manually or automatically, the purpose of analyzing each layer is to extract a specific type of information. For example,

  • Documentation Layer: When referring to documentation we mean documents that provide information about the software's domain, its context, and requirements (functional, non-functional, or quality). Reading this type of documentation allows the reader to comprehend the domain in which the software is used, the context in which it operates, as well as the requirements it needs to satisfy. Do keep in mind that is it common for documentation to be missing, outdated, or incomplete. Analyzing documentation is typically a manual process.
  • Architecture Layer: Analyzing the architecture layer means extracting information about the software's packages, components, and dependencies between the components. It is common to use tools that automatically extract architecture-related information. Such tools are known as software visualization tools and typically express architecture information visually in the form of graphs and UML class diagrams.
  • Source Code Layer: In general, the best way of getting reliable information is by going to the source and in software comprehension that is not the exception. Manually inspecting the software's source code provides information about how components work and algorithms implementation.

Independently, no single layer provides a complete view of the system. However, together the layers can give a good overview of the system. Large and complex systems take time to analyze. Nevertheless, the use of tools can speed up the comprehension process. But what tools can be used for such purpose?

Software Comprehension Tools

In this section, I will be discussing tools that can help you in the process of comprehending a system. Note, however, that I will be focusing exclusively on tools that help analyze the architecture layer.

Software Structure Tools

Tools in this category are characterized by visually displaying a high-level abstraction of the software's structure. That is, they visually display the packages of the system, the components that compose each package, and the inner structure of components. Using tools of this category are great for obtaining a high-level understanding of the number of packages, the relationship between the packages, and the components in each module. Example of tools that belong to this category include:

1. StartUML

This is a cross-platform tool (Linux, Windows, Mac) that allow users to create different types of UML diagrams. By itself, this tool does not have functionality for reverse engineering software. However, you can download one of its many extensions to add this functionality. I have worked with this tool before; specifically with the reverse engineering extension for Java. After importing a java project, the tool creates a tree-like structure showing containing UML diagrams for the classes, the packages, and the relationship between them.

StartUML

2. Code City

This tool is interesting. It allows you to visualize the architecture of software in the form of a 3D city. Classes are represented as buildings. The height of the building indicates the number of methods, while the width represents the number of attributes. Therefore, the tall buildings represent classes with a lot of functionality, while wide buildings are classes with a lot of states. On the other hand, packages are depicted as districts where building resides. Nested packages are also shown in the "city," and they are identified differences in color hue. The metaphor is that by exploring the "software city," you are exploring the architecture of the software. The idea of mapping software as a city is interesting and intuitive to understand [2]. Although with this tool users cannot explore the class internals it is a fantastic tool for obtaining a high-level overview of the software's architecture.

Code City

Software Dependency Tools

Tools in this category are characterized by visually displaying the dependencies between packages and components. Tools typically show the information in the form of graphs. Examples of tools that belong to this category include:

1. XRay

This tool is an Eclipse plug-in, and its purpose is to explore dependencies between software components. Its dependency View feature allows visualizing the dependency between classes or between packages in a bi-directional circle. Such graphs show the level of coupling between classes or packages. An unfortunate aspect of this class is that it is an Eclipse plug-in instead of a stand-alone application.

Xray

2. Analizo + Graphviz

Graphviz is just an open-source tool for generating graphs. It can be used in domains outside software engineering such as networking, database design, web design, and more. Graphs are generated by creating "layout program" which is nothing more than a program written in a specific language called "Dot language." The power of Graphviz in the context of reverse engineering software is provided with the use of another tool called Analizo. Besides calculating internal quality metrics, Analizo can also be used for generating dependency graphs with the use of graphviz. The resulting graphs can be generated as either a png file or the .dot file.

Analyzo

Conclusion

Complex and large systems are not easy to comprehend. Moreover, the task becomes more difficult when you did not build it. Understanding a software involves analyzing its various layers, including the documentation, architecture, and source code layer. Each layer provides different information that, together, provide a broad overview of the system. To be more efficient in the process of comprehending a system, it is recommended to use software comprehension tools. As expected, no single tool can provide a complete system overview. Instead, it is best to use a set of tools that complement each other.

With this article, I conclude this series on Software Maintenance and Software comprehension. If you enjoyed this article, please recommend and share. Don't forget to subscribe and follow me on Twitter to stay up-to-date with my latest posts. See you soon.

References

[1] Software Visualization Tools: Survey and Analysis by Sarita Bassil and Rudolf K. Keller
[2] CodeCity: 3D Visualization of Large-Scale Software by Richard Wettel and Michele Lanza
[3] Software Evolution Slides, Lecture #2 by Regina Hebig
● ● ●

How would you rate this article?