Understanding programs often comes down to understanding the ways that input data is processed. As one example, maintainers working on the year 2000 problem need to locate and understand code whose execution depends on date inputs. This paper presents several methods for addressing this problem.
Data sensitive code can be located by running many test cases that are identical except for a change in one data value. A test coverage tool can recover each test's execution count vector giving the number of times that each basic block was executed. Comparison of the vectors reveals the data sensitive blocks whose execution is affected by the input data values. We present several methods of analyzing and graphing the execution count data to locate potentially faulty algorithms. The methods are illustrated using Bellcore's cSuds tool on five small C programs that use some of the date encodings that year 2000 maintainers may need to locate and understand.
The methods presented may be of some practical use to maintainers, but also illustrate a different theoretical perspective on code. We can analyze a code fragment to identify the inputs that control it, to find out how many different subdomains each input has, and to check whether processing of an input is localized or distributed in distinct parts of the program.
This report may be cited as SERC-TR-83-F, Software Engineering Research Center, University of Florida, CIS Department, Gainesville, FL 32611, January, 1998.
Download a copy of the report in Microsoft Word 7.0 format or in Rich Text (RTF) format.
For further information contact Norman Wilde.