• No results found

Information needs Frequency

7.4 Program comprehension and tools

7.4.2 Maintenance workbenches

Tools that provide static analysis in the form of data ows, control ows, call graphs along with editing, debugging, incremental compilation and navigation are commonly marketed as maintenance workbenches.These tools are built around a database commonly representing the abstract syntax of the program. Source code is parsed and information about the source (or the entire source) is stored in the database.

Tools marketed as maintenance workbenches vary along the dimension of database complexity.

Some of these tools extract and store limited amounts of information, which is maintained in parallel with the source les. Such tools expect that the actual manipulation of code by the programmer will take place in the source le. Other maintenance workbenches parse the application into a complex data structure. The source code is represented within this data structure, which becomes the primary target of user changes. In these tools, changes to program statements are made to the database rather than the initial source les. In both types of workbenches, mechanisms are provided to allow the database to be updated incrementally as changes are made to the source.

Tools in the maintenance workbench category include Procase SMARTSystem, Centerline Code-Center, Software Emancipation ParaSET.

7.4.2.1 Support for program comprehension

Again, there is little information available regarding the speci c value of maintenance workbenches.

However, since they provide basic static analysis capabilities, it is likely that they can help the main-tainer construct a program model and to identify beacons in a manner similar to more conventional static analysis tools.

Workbenches di er from static analysis tools primarily in their additional capabilities in the

CHAPTER 7. A MAINTENANCE PERSPECTIVE 96 areas of editing, debugging, data ltering and navigation. Here, debugging, data ltering, and navigation will be discussed.

7.4.2.1.1 Debugging

The debugging capabilities provided by maintenance workbenches are similar to those provided by standard system debuggers and editors. Although xing bugs has been shown to be a relatively small portion of maintenance activities, debugging serves a useful function in isolating particular problems in an application. In fact, one maintenance expert with whom we spoke listed a good source debugger as his highest tool priority. What is not clear is whether the debugging capability provided by a workbench is preferred over those commonly available as stand-alone tools.

Feedback from maintainers who have used tools with complex underlying databases suggests that the tools are less likely to be used if signi cant overhead and processing is involved in developing a complex internal model of the application. In fact, in summarizing her ndings from working with a large number of maintainers at Hewlett Packard, [von Mayrhauser 94] states that maintainers prefer a suite of individual tools rather than an integrated workbench. She attributes this preference to an unwillingness to incur the overhead associated with the workbench when a similar function is available with far less overhead.

This sentiment was echoed by a number of researchers in program comprehension technology at the 1994 Workshop on Program Comprehension. To paraphrase maintenance experts at a large telecommunications rm, the further the tool moves away from the le system as its repository for information, the less accepting maintainers are of the tool. Thus, while the debugging capabilities of maintenance workbenches are no doubt useful, there is some evidence to suggest that maintainers might prefer the simpler solution of a stand-alone debugger.

7.4.2.1.2 Filtering

Filtering is one area in which maintenance workbenches clearly stand apart from simpler static analysis tools. Maintenance workbenches attempt to provide sophisticated capabilities which allow the user to highlight certain information while hiding extraneous detail.

Commonly, information displayed by the tool can be ltered based on prede ned and user-de ned criteria. For example, Procase SMARTSystem supports ltering of data based on data de nitions, functions, exception handlers, and other prede ned criteria, as well as arbitrary patterns speci ed by the user. In addition, lter criteria can be combined to create complex lters.

The ltering capability of maintenance workbenches is an attempt to encourage program com-prehension by supporting the problem solving strategies of maintainers. By reducing the informa-tion displayed to highlight that which provides speci c answers to maintainer quesinforma-tions, ltering can support the generation of the program, situation, and top-down (domain) models, as well as

CHAPTER 7. A MAINTENANCE PERSPECTIVE 97 the switching between models.

Unfortunately, the ltering mechanisms commonly available in tools do not provide the ability to answer completely ad-hoc questions about the source code. While they can provide a range of

\prede ned" displays and support additional ltering to further reduce the amount of information presented to the user, they do not support ltering based on domain concepts. We would expect such domain-based ltering to be critical for building a domain model and for recognizing they way in which that model is manifest in the source code.

For example, based on his/her domain knowledge, a maintainer may formulate a question requiring information about the sequence of steps involved in the termination of a process. With current tools, unless s/he knows the manner in which process termination is manifest in the source code (i.e, the names of variables, procedures, etc.), it is dicult to specify an appropriate query.

On the other hand, if s/he already knows this information, it is unlikely that sophisticated query capabilities are necessary.

7.4.2.1.3 Navigation

Program workbenches can provide a convenient, often graphical way to navigate the system under study without concern for managing source les. Navigation is commonly provided based on call graphs, and control/ data ows, and also allows the users to locate identi er de nitions and references.

It is likely that such navigation capabilities are useful for the maintainer. In research on use of the CARE workbench by computer science students, [Linos et al 93] found that direct navigation from a call graph to the source code for a module was among the most useful capabilities.

However, it is not clear that the more \ ned-grained" navigation capabilities provided by work-benches are preferred by maintainers over more traditional search techniques. As previously men-tioned, [Joiner et. al 94] suggest that expert software maintainers prefer course-grained navigation between larger program units such as modules, since they choose to manually inspect entire modules in order to understand the context of individual statements.

It is also likely that the additional capabilities of \ ne-grained" navigation are rejected as a poor trade-o for the additional overhead incurred in parsing of the source code and building the database. Some newer maintenance workbenches claim to provide navigation without excessive overhead.

CHAPTER 7. A MAINTENANCE PERSPECTIVE 98