skip to main content
article
Free Access

Precise executable interprocedural slices

Published:01 March 1993Publication History
Skip Abstract Section

Abstract

The notion of a program slice, originally introduced by Mark Weiser, is useful in program debugging, automatic parallelization, program integration, and software maintenance. A slice of a program is taken with respect to a program point p and a variable x; the slice consists of all statements of the program that might affect the value of x at point p. An interprocedural slice is a slice of an entire program, where the slice crosses the boundaries of procedure calls.

Weiser's original interprocedural-slicing algorithm produces imprecise slices that are executable programs. A recent algorithm developed by Horwitz, Reps, and Binkley produces more precise (smaller) slices by more accurately identifying those statements that might affect the values of x at point p. These slices, however, are not executable. An extension to their algorithm that produces more precise executable interprocedural slices is described together with a proof of correctness for the new algorithm.

References

  1. ALLEN, F., BURKE, M., CHARLES, P., CYTRON, R., AND FERRANTE, J. 1987. An overview of the PTRAN analysis system for multiprocessing. Res. Rep. RC 13115, IGM T.J. Watson Research Center, Yorktown Heights, N.Y.Google ScholarGoogle Scholar
  2. BADGER, L. AND WEISER, M. 1988. Minimizing communication for synchronizing parallel dataflow programs. In Proceedings of the 1988 international Conference on Parallel Processing (St. Charles, Ill., Aug. 15-19). Pennsylvania State University Press, University Park.Google ScholarGoogle Scholar
  3. BANNING, J.P. 1979. An efficient way to find the side effects of procedure calls and the aliases of variables. In Conference Record of the 6th ACM Symposium on the Principles of Programming Languages (San Antonio, Tex, Jan. 29-31). ACM, New York, 29-41. Google ScholarGoogle Scholar
  4. BARTH, J.M. 1978. A practical interprocedural data flow analysis algorithm. Commun. ACM 21, 9 (Sept.), 724-736. Google ScholarGoogle Scholar
  5. BINKLEY, D. 1992. Using semantic differencing to reduce the cost of regression testing. In Proceedings of the IEEE Conference on Software Maintenance (Orlando, Fla, Nov.). IEEE Computer Society, Washington, D.C., 41-50.Google ScholarGoogle Scholar
  6. BINKLEY, D. 1991. Multi-procedure program integration. Ph.D. dissertation and Tech. Rep. TR-1038, Computer Sciences Dept., Univ. of Wisconsin, Madison, Wisc. Google ScholarGoogle Scholar
  7. GALLAGHER, K. B. AND LYLE, J.R. 1991. Using program slicing in software maintenance. IEEE Trans. Softw. Eng. SE- 17, 8, 751- 761. Google ScholarGoogle Scholar
  8. HORWITZ, S., PRINS, J., AND REPS, T. 1989. Integrating non-interfering versions of programs. ACM Trans. Program. Lang. Syst. 11, 3 (July), 345-387. Google ScholarGoogle Scholar
  9. I~IoRWITZ, S., REPS, T., AND BINKLEY, D. 1990. Interprocedural slicing using dependence graphs. ACM Trans. Program. Lang. Syst. 12, 1 (Jan.), 26-60. Google ScholarGoogle Scholar
  10. KUCK, D. J., KUHN, R. H., LEASURE, B., PADUA, D. A., AND WOLFE, M. 1981. Dependence graphs and compiler optimizations. In Conference Record of the 8th ACM Symposium on the Principles of Programming Languages (Williamsburg, Va., Jan. 26-28). ACM, New York, 207-218. Google ScholarGoogle Scholar
  11. KUCK, D. J., MURAOKA, Y., AND CHEN, S.C. 1972. On the number of operations simultaneously executable in FORTRAN-like programs and their resulting speed-up. IEEE Trans. Comput. C-21, 12 (Dec.), 1293-1310.Google ScholarGoogle Scholar
  12. LYLE, J. AND WEISER, M. 1986. Experiments on slicing-based debugging tools. In Proceedings of the 1st Conference on Empirical Studies of Programming (June). Ablex, Norwood, N.J. Google ScholarGoogle Scholar
  13. REPS, T. AND YANG, W. 1989. The semantics of program slicing and program integration. In Proceedings of the Colloquium on Current Issues in Programming Languages (Barcelona, Spain, Mar. 13-17). Lectm'e Notes in Computer Science, vol. 352. Springer-Verlag, New York, 360-374. Google ScholarGoogle Scholar
  14. REPS, T. AND YANG, W. 1988. The semantics of program slicing. Tech. Rep. TR-777, Computer Sciences Dept., Univ. of Wisconsin, Madison, Wisc.Google ScholarGoogle Scholar
  15. VENKATESH, G.A. 1991. The semantic approach to program slicing. In Proceedings of the ACM SIGPLAN 91 Conference on Programming Language Design and Implementation (Toronto, Ont., June 26-28). ACM SIGPLAN Not. (July). Google ScholarGoogle Scholar
  16. WEISER, M. 1984. Program slicing. IEEE Trans. Softw. Eng. SE-IO, 4 (July), 352-357.Google ScholarGoogle Scholar
  17. WEISER, M. 1983. Reconstructing sequential behavior from parallel behavior projections. Inf. Process. Lett. 17, 5 (Oct.), 129-135.Google ScholarGoogle Scholar

Index Terms

  1. Precise executable interprocedural slices

        Recommendations

        Reviews

        Marian Gheorghe

        A program slice describes all the statements of the program affecting a given variable x at a given point p . Interprocedural slicing, in which a slice crosses the boundaries of the procedure calls, is studied here. A short history of this problem is presented. An algorithm due to Weiser [1] identifies imprecise slices—those that include large parts of the program that do not affect the point and the variable under consideration. Another algorithm produces more precise slices which, however, are not executable [2]. Starting from this last algorithm, the author presents a new algorithm for producing executable interprocedural slices. He gives a proof of the correctness of this algorithm. The problem studied in this paper has a number of important applications for understanding complex code and for debugging and maintaining software products. The presentation is clear, with comprehensive examples and a suitable mathematical model, a system dependence graph.

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!