Support of Software Maintenance Using Data Flow Analysis

With few exceptions, software that is used is changed, often many time. These changes are frequently made by individuals who do not have time to fully understand the code they are changing. This results in code that --over time-- contains many segments that no longer contribute to required functionality. We describe an effort underway at Old Dominion University to determine if some code analysis techniques long used in the compiler development community can be useful during code maintenance. An example is the identification of useless code: code which may execute by which cannot effect program output. Several components of a "proof-of-concept" system have been completed. These include a Pascal parse tree generator, a Pascal parse tree to source code transformer, two control flow graph generators, and a "ripple" analysis tool. Informally, ripple analysis identifies possible side effects which result from modification of a program statement. This is one step in identifying useless code. In addition to these Pascal-based tools, a COBOL parse tree generator exists for a significant subset of COBOL. Ripple analysis is typical of a class of static code analysis techniques which could be useful during software development, validation, and maintenance. But two key issues must be better understood about these kinds of analyses: their speed and utility when dealing with "real" systems. Some existing algorithms have worst case run-time complexity, and we are most interested in programs where n is O (1,000,000). It remains to be demonstrated that these algorithms are feasible to use with large systems because of their run-time behavior. Secondly we must demonstrate that the information provided is worth the effort to produce it. This is what we are now about.