The use of program profiling for software maintenance with applications to the year 2000 problem
This paper describes new techniques to help with testing and debugging, using information obtained from path profiling. A path profiler instruments a program so that the number of times each different loop-free path executes is accumulated during an execution run. With such an instrumented program, each run of the program generates a path spectrum for the execution—a distribution of the paths that were executed during that run. A path spectrum is a finite, easily obtainable characterization of a program's execution on a dataset, and provides a behavior signature for a run of the program.
Our techniques are based on the idea of comparing path spectra from different runs of the program. When different runs produce different spectra, the spectral differences can be used to identify paths in the program along which control diverges in the two runs. By choosing input datasets to hold all factors constant except one, the divergence can be attributed to this factor. The point of divergence itself may not be the cause of the underlying problem, but provides a starting place for a programmer to begin his exploration.
One application of this technique is in the “Year 2000 Problem” (i.e., the problem of fixing computer systems that use only 2-digit year fields in date-valued data). In this context, pathspectrum comparison provides a heuristic for identifying paths in a program that are good candidates for being date-dependent computations. The application of path-spectrum comparison to a number of other software-maintenance issues is also discussed.
KeywordsEdge Label Execution State Defense Advance Research Project Agency Executable File IEEE Comp
Unable to display preview. Download preview PDF.
- 1.Abramson, D., Foster, I., Michalakes, J., and Sosic, R., “Relative debugging: A new methodology for debugging scientific applications,” Commun. of the ACM 39(11) pp. 68–77 (Nov. 1996).Google Scholar
- 2.Bala, V., “Low overhead path profiling,” Tech. Rep., Hewlett-Packard Labs (1996).Google Scholar
- 3.Ball, T., “Efficiently counting program events with support for on-line queries,” ACM Trans. Program. Lang. Syst. 16(5) pp. 1399–1410 (Sept. 1994).Google Scholar
- 4.Ball, T. and Larus, J., “Efficient path profiling,” in Proc. of MICRO-29, (Dec. 1996).Google Scholar
- 5.Benedusi, P., Benvenuto, V., and Tomacelli, L., “The role of testing and dynamic analysis in program comprehension supports,” pp. 149–158 in Proc. of the Second IEEE Workshop on Program Comprehension, (July 8–9, 1993 Capri, Italy), ed. B. Fadini and V. Rajlich,IEEE Comp. Soc. Press, Wash., DC (July 1993).Google Scholar
- 6.Chen, Y.-F., Rosenblum, D.S., and Vo, K.-P., “TestTube: A system for selective regression testing,” in Proc. of the Sixteenth Int. Conf. on Softw. Eng., (May 16–21, 1994, Sorrento, Italy), IEEE Comp. Soc. Press, Wash., DC (1994).Google Scholar
- 7.Clarke, L.A., Podgurski, A., Richardson, D.J., and Zeil, S.J., “A comparison of data flow path selection criteria,” pp. 244–251 in Proc. of the Eighth Int. Conf. on Softw. Eng., IEEE Comp. Soc. Press, Wash., DC (1985).Google Scholar
- 8.Gartner Group, Year 2000 Problem Gains National Attention, Gartner Group, Stamford, CT (April 1996). (See URL http://www.gartner.con/aboutgg/pressrel/pry2000.html.)Google Scholar
- 9.Horwitz, S., Reps, T., and Binkley, D., “Interprocedural slicing using dependence graphs,” ACM Trans. Program. Lang. Syst. 12(1) pp. 26–60 (Jan. 1990).Google Scholar
- 10.Johnson, S.C., “Postloading for fun and profit,” pp. 325-330 in Proc. of the Winter 1990 USENIX Conf., (Jan. 1990).Google Scholar
- 11.Larus, J.R. and Schnarr, E., “EEL: Machine-independent executable editing,” Proc. of the ACM SIGPLAN 95 Conf. on Programming Language Design and Implementation, (La Jolla, CA, June 18–21, 1995), ACM SIGPLAN Notices 30(6) pp. 291–300 (June 1995).Google Scholar
- 12.Ottenstein, K.J. and Ottenstein, L.M., “The program dependence graph in a software development environment,” Proc. of the ACM SIGSOFTISIGPLAN Softw. Eng. Symp. on Practical Software Development Environments, (Pittsburgh, PA, Apr. 23–25, 1984), ACM SIGPLAN Notices 19(5) pp. 177–184 (May 1984).Google Scholar
- 13.Rapps, S. and Weyuker, E.J., “Selecting software test data using data flow information,” IEEE Trans. on Softw. Eng. SE-11(4) pp. 367–375 (Apr. 1985).Google Scholar
- 14.Reps, T., Horwitz, S., Sagiv, M., and Rosay, G., “Speeding up slicing,” SIGSOFT 94: Proc. of the Second ACM SIGSOFT Symp. on the Found. of Softw. Eng., (New Orleans, LA, Dec. 7–9,1994), ACM SIGSOFT Softw. Eng. Notes 19(5) pp. 11–20 (Dec. 1994).Google Scholar
- 15.Roper, M., Software Testing, McGraw-Hill, New York, NY (1994).Google Scholar
- 16.Sedgewick, R., Algorithms, Addison-Wesley, Reading, MA (1983).Google Scholar
- 17.Sneed, H.M. and Ritsch, H., “Reverse engineering programs via dynamic analysis,” pp. 192–201 in Proc. of the IEEE Working Conf. on Reverse Engineering, (May 21–23, 1993, Baltimore, MD), IEEE Comp. Soc. Press, Wash., DC (May 1993).Google Scholar
- 18.Sneed, H.M. and Erdos, K., “Extracting business rules from source code,” pp. 240–247 in Proc. of the Fourth IEEE Workshop on Program Comprehension, (Mar. 29–31, 1996, Berlin, Germany), ed. V. Rajlich, A. Cimitile, and H.A. Mueller, IEEE Comp. Soc. Press, Wash., DC (Mar. 1996).Google Scholar
- 19.Srivastava, A. and Eustace, A., “ATOM: A system for building customized program analysis tools,” Proc. of the ACM SIGPLAN 94 Conf. on Programming Language Design and Implementation, (Orlando, FL, June 22–24,1994), ACM SIGPLAN Notices 29(6) pp. 196–205 (June 1994).Google Scholar
- 20.Weiser, M., “Program slicing,” IEEE Trans. on Softw. Eng. SE-10(4) pp. 352–357 (July 1984).Google Scholar
- 21.Woodward, M.R., Hedley, D., and Hennell, M.A., “Experience with path analysis and testing of programs,” IEEE Trans. on Softw. Eng. SE-6(3) pp. 278–286 (May 1980).Google Scholar