Abstract
A slice of a program with respect to a program point p and variable x consists of all statements of the program that might affect the value of x at point p. This paper concerns the problem of interprocedural slicing -- generating a slice of an entire program, where the slice crosses the boundaries of procedure calls. To solve this problem, we introduce a new kind of graph to represent programs, called a system dependence graph, which extends previous dependence representations to incorporate collections of procedures (with procedure calls) rather than just monolithic programs. Our main result is an algorithm for interprocedural slicing that uses the new representation.The chief difficulty in interprocedural slicing is correctly accounting for the calling context of a called procedure. To handle this problem, system dependence graphs include some data-dependence edges that represent transitive dependencies due to the effects of procedure calls, in addition to the conventional direct-dependence edges. These edges are constructed with the aid of an auxiliary structure that represents calling and parameter-linkage relationships. This structure takes the form of an attribute grammar. The step of computing the required transitive-dependence edges is reduced to the construction of the subordinate characteristic graphs for the grammar's nonterminals.
- H. Agrawal. On slicing programs with jump statements. In Conf. on Prog. Lang. Design and Impl., pages 302--312, 1994.]] Google ScholarDigital Library
- T. Ball and S. Horwitz. Slicing programs with arbitrary control-flow. In Int. Workshop on Automated and Algorithmic Debugging, pages 206--222, 1993.]] Google ScholarDigital Library
- T. Ball and S. K. Rajamani. Bebop: A path-sensitive interprocedural dataflow engine. In Workshop on Prog. Analysis for Softw. Tools and Eng., New York, NY, June 2001. ACM Press.]] Google ScholarDigital Library
- U. Bannerjee. Speedup of Ordinary Programs. PhD thesis, Dept. of Comp. Sci., Univ. of Illinois, Urbana, IL, October 1979.]] Google ScholarDigital Library
- M. Benedikt, P. Godefroid, and T. Reps. Model checking of unrestricted hierarchical state machines. In ICALP '01, 2001.]] Google ScholarDigital Library
- D. Binkley. Multi-Procedure Program Integration. PhD thesis, Comp. Sci. Dept., Univ. of Wisconsin, Madison, WI, August 1991. Tech. Rep. TR-1038.]] Google ScholarDigital Library
- D. Binkley. Precise executable interprocedural slices. Let. on Prog. Lang. and Syst., 2:31--45, 1993.]] Google ScholarDigital Library
- D. Callahan. The program summary graph and flow-sensitive interprocedural data flow analysis. In Conf. on Prog. Lang. Design and Impl., pages 47--56, New York, NY, 1988. ACM Press.]] Google ScholarDigital Library
- D. Callahan, K. D. Cooper, K. Kennedy, and L. Torczon. Interprocedural constant propagation. In Symp. on Comp. Construct., pages 152--161, 1986.]] Google ScholarDigital Library
- D.R. Chase, M. Wegman, and F. Zadeck. Analysis of pointers and structures. In Conf. on Prog. Lang. Design and Impl., pages 296--310, New York, NY, 1990. ACM Press.]] Google ScholarDigital Library
- J.-D. Choi and J. Ferrante. Static slicing in the presence of goto statements. Trans. on Prog. Lang. and Syst., 16(4):1096--1113, 1994.]] Google ScholarDigital Library
- K.D. Cooper and K. Kennedy. Interprocedural side-effect analysis in linear time. In Conf. on Prog. Lang. Design and Impl., pages 57--66, New York, NY, 1988. ACM Press.]] Google ScholarDigital Library
- P. Cousot and R. Cousot. Static determination of dynamic properties of recursive procedures. In E. J. Neuhold, editor, Formal Descriptions of Programming Concepts, (IFIP WG 2.2, St. Andrews, Canada, August 1977), pages 237--277. North-Holland, 1978.]]Google Scholar
- M. Das, S. Lerner, and M. Seigle. ESP: Path-sensitive program verification in polynomial time. In Conf. on Prog. Lang. Design and Impl., pages 57--68, New York, NY, 2002. ACM Press.]] Google ScholarDigital Library
- M. B. Dwyer, J. C. Corbett, J. Hatcliff, S. Sokolowski, and H. Zheng. Slicing multi-threaded Java programs: A case study. Tech. Rep. 99-7, Dept. of Comp. and Inf. Sci., Kansas State Univ., Manhattan, KS, February 1999.]]Google Scholar
- M. Emami, R. Ghiya, and L. Hendren. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Conf. on Prog. Lang. Design and Impl., New York, NY, 1994. ACM Press.]] Google ScholarDigital Library
- J. Ferrante, K. Ottenstein, and J. Warren. The program dependence graph and its use in optimization. Trans. on Prog. Lang. and Syst., 3(9):319--349, 1987.]] Google ScholarDigital Library
- G. Goff, K. Kennedy, and C.-W. Tseng. Practical dependence testing. In Conf. on Prog. Lang. Design and Impl., pages 15--29, New York, NY, 1991. ACM Press.]] Google ScholarDigital Library
- S. Horwitz, P. Pfeiffer, and T. Reps. Dependence analysis for pointer variables. In Conf. on Prog. Lang. Design and Impl., pages 28--40, New York, NY, 1989. ACM Press.]] Google ScholarDigital Library
- S. Horwitz, T. Reps, and D. Binkley. Interprocedural slicing using dependence graphs. Trans. on Prog. Lang. and Syst., 12(1):26--60, January 1990.]] Google ScholarDigital Library
- S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In Symp. on the Found. of Softw. Eng., pages 104--115, New York, NY, October 1995. ACM Press.]] Google ScholarDigital Library
- S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. report TR-1283, Comp. Sci. Dept., Univ. of Wisconsin, August 1995. Available at "http://www.cs.wisc.edu/wpis/papers/tr1283r.ps".]]Google Scholar
- S. Horwitz, T. Reps, M. Sagiv, and G. Rosay. Speeding up slicing. In Symp. on the Found. of Softw. Eng., pages 11--20, New York, NY, December 1994. ACM Press.]] Google ScholarDigital Library
- U. Kastens. Ordered attribute grammars. Acta Inf., 13(3):229--256, 1980.]]Google ScholarDigital Library
- D.E. Knuth. Semantics of context-free languages. Math. Syst. Theory, 2:127--145, 1968.]]Google ScholarCross Ref
- J. Krinke. Static slicing of threaded programs. In Workshop on Prog. Analysis for Softw. Tools and Eng., June 1998.]] Google ScholarDigital Library
- S. Kumar and S. Horwitz. Better slicing of programs with jumps and switches. In Colloq on Formal Approaches in Softw. Eng., pages 96--112, 2002.]] Google ScholarDigital Library
- J. R. Larus and P. N. Hilfinger. Detecting conflicts between structure accesses. In Conf. on Prog. Lang. Design and Impl., pages 21--34, New York, NY, 1988. ACM Press.]] Google ScholarDigital Library
- D. E. Maydan, J. L. Hennessy, and M. S. Lam. Efficient and exact data dependence analysis. In Conf. on Prog. Lang. Design and Impl., pages 1--14, New York, NY, 1991. ACM Press.]] Google ScholarDigital Library
- M. Nanda and S. Ramesh. Slicing concurrent programs. In Symp. on Softw. Testing and Analysis, August 2000.]] Google ScholarDigital Library
- K. J. Ottenstein and L. M. Ottenstein. The program dependence graph in a software development environment. In Softw. Eng. Symp. on Practical Softw. Dev. Environments, pages 177--184, New York, NY, 1984. ACM Press.]] Google ScholarDigital Library
- W. Pugh and D. Wonnacott. Eliminating false data dependences using the Omega test. In Conf. on Prog. Lang. Design and Impl., pages 140--151, New York, NY, 1992. ACM Press.]] Google ScholarDigital Library
- G. Ramalingam. Context-sensitive synchronization-sensitive analysis is undecidable. Trans. on Prog. Lang. and Syst., 22(2):416--430, 2000.]] Google ScholarDigital Library
- J. Rehof and M. Fähndrich. Type-base flow analysis: From polymorphic subtyping to CFL-reachability. In Symp. on Princ. of Prog. Lang., pages 54--66, New York, NY, 2001. ACM Press.]] Google ScholarDigital Library
- T. Reps. Demand interprocedural program analysis using logic databases. In R. Ramakrishnan, editor, Applications of Logic Databases. Kluwer Academic Publishers, 1994.]]Google Scholar
- T. Reps. Shape analysis as a generalized path problem. In Symp. on Part. Eval. and Semantics-Based Prog. Manip., pages 1--11, New York, NY, June 1995. ACM Press.]] Google ScholarDigital Library
- T. Reps. On the sequential nature of interprocedural program-analysis problems. Acta Inf., 33:739--757, 1996.]]Google ScholarDigital Library
- T. Reps. Program analysis via graph reachability. Inf. and Softw. Tech., 40(11--12):701--726, November 1998.]]Google Scholar
- T. Reps. Undecidability of context-sensitive data-dependence analysis. Trans. on Prog. Lang. and Syst., 22(1):162--186, January 2000.]] Google ScholarDigital Library
- T. Reps, S. Horwitz, and D. Binkley, U.S. Patent Number 5,161,216, Interprocedural slicing of computer programs using dependence graphs, November 1992.]]Google Scholar
- T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In Symp. on Princ. of Prog. Lang., pages 49--61, New York, NY, 1995. ACM Press.]] Google ScholarDigital Library
- T. Reps and G. Rosay. Precise interprocedural chopping. In Symp. on the Found. of Softw. Eng., New York, NY, October 1995. ACM Press.]] Google ScholarDigital Library
- T. Reps, M. Sagiv, and S. Horwitz. Interprocedural dataflow analysis via graph reachability. Tech. Rep. TR 94-14, Datalogisk Institut, Univ. of Copenhagen, 1994. Available at "http://www.cs.wisc.edu/wpis/papers/diku-tr94-14.ps".]]Google Scholar
- M. Sagiv, T. Reps, and S. Horwitz. Precise interprocedural dataflow analysis with applications to constant propagation. Theor. Comp. Sci., 167:131--170, 1996.]] Google ScholarDigital Library
- M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In S. S. Muchnick and N. D. Jones, editors, Program Flow Analysis: Theory and Applications, chapter 7, pages 189--234. Prentice-Hall, Englewood Cliffs, NJ, 1981.]]Google Scholar
- S. Sinha, M. Harrold, and G. Rothermel. System-dependence-graph-based slicing of programs with arbitrary control flow. In Int. Conf. on Softw. Eng., pages 432--441, Wash., DC, 1999. IEEE Comp. Soc.]] Google ScholarDigital Library
- M. Weiser. Program slicing. In Int. Conf. on Softw. Eng., pages 439--441, Wash., DC, 1981. IEEE Comp. Soc.]] Google ScholarDigital Library
- M. Weiser. Program slicing. Trans. on Softw. Eng., SE-10(4):352--357, July 1984.]]Google ScholarDigital Library
- R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C programs. In Conf. on Prog. Lang. Design and Impl., pages 1--12, New York, NY, 1995. ACM Press.]] Google ScholarDigital Library
- M. J. Wolfe. Optimizing Supercompilers for Supercomputers. PhD thesis, Dept. of Comp. Sci., Univ. of Illinois, Urbana, IL, October 1982.]] Google ScholarDigital Library
- M. Yannakakis. Graph-theoretic methods in database theory. In Symp. on Princ. of Database Syst., pages 230--242, 1990.]] Google ScholarDigital Library
- Babich78. Babich, W. A. and Jazayeri, M., "The method of attributes for data flow analysis: Part II. Demand analysis," Acta Informatica 10(3) pp. 265--272 (October 1978).]]Google ScholarDigital Library
- Banning79. Banning, J. P., "An efficient way to find the side effects of procedure calls and the aliases of variables," pp. 29--41 in Conference Record of the Sixth ACM Symposium on Principles of Programming Languages, (San Antonio, TX, Jan. 29--31, 1979), ACM, New York (1979).]] Google ScholarDigital Library
- Callahan88. Callahan, D., "The program summary graph and flow-sensitive interprocedural data flow analysis," Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22--24, 1988), ACM SIGPLAN Notices, (June 1988).]] Google ScholarDigital Library
- Cooper88. Cooper, K. D. and Kennedy, K., "Interprocedural side-effect analysis in linear time," Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22--24, 1988), ACM SIGPLAN Notices, (June 1988).]] Google ScholarDigital Library
- Ferrante87. Ferrante, J., Ottenstein, K., and Warren, J., "The program dependence graph and its use in optimization," ACM Transactions on Programming Languages and Systems 9(3) pp. 319--349 (July 1987).]] Google ScholarDigital Library
- Horwitz87. Horwitz, S., Prins, J., and Reps, T., "Integrating non-interfering versions of programs," TR-690, Computer Sciences Department, University of Wisconsin, Madison, WI (March 1987).]]Google Scholar
- Horwitz88. Horwitz, S., Prins, J., and Reps, T., "Integrating non-interfering versions of programs," pp. 133--145 in Conference Record of the Fifteenth ACM Symposium on Principles of Programming Languages, (San Diego, CA, January 13--15, 1988), ACM, New York (1988).]] Google ScholarDigital Library
- Horwitz88a. Horwitz, S., Reps, T., and Binkley, D., "Interprocedural slicing using dependence graphs," TR-756, Computer Sciences Department, University of Wisconsin, Madison, WI (March 1988).]]Google Scholar
- Kastens80. Kastens, U., "Ordered attribute grammars," Acta Inf. 13(3) pp. 229--256 (1980).]]Google ScholarDigital Library
- Knuth68. Knuth, D. E., "Semantics of context-free languages," Math. Syst. Theory 2(2) pp. 127--145 (June 1968).]]Google ScholarCross Ref
- Kou77. Kou, L. T., "On live-dead analysis for global data flow problems," Journal of the ACM 24(3) pp. 473--483 (July 1977).]] Google ScholarDigital Library
- Kuck72. Kuck, D. J., Muraoka, Y., and Chen, S. C., "On the number of operations simultaneously executable in FORTRAN-like programs and their resulting speed-up," IEEE Trans. on Computers C-21(12) pp. 1293--1310 (December 1972).]]Google Scholar
- Myers81. Myers, E., "A precise inter-procedural data flow algorithm," pp. 219--230 in Conference Record of the Eighth ACM Symposium on Principles of Programming Languages, (Williamsburg, VA, January 26--28, 1981), ACM, New York (1981).]] Google ScholarDigital Library
- Ottenstein84. Ottenstein, K. J. and Ottenstein, L. M., "The program dependence graph in a software development environment," Proceedings of the ACM SIGSOFTISIGPLAN Software Engineering Symposium on Practical Software Development Environments, (Pittsburgh, PA, Apr. 23--25, 1984), ACM SIGPLAN Notices 19(5) pp. 177--184 (May 1984).]] Google ScholarDigital Library
- Reps88. Reps, T. and Yang, W., "The semantics of program slicing," Tech. Rep. in preparation, Computer Sciences Department, University of Wisconsin, Madison, WI (Spring 1988).]]Google Scholar
- Waite83. Waite, W. M. and Goos, G., Compiler Construction, Springer-Verlag, New York (1983).]]Google Scholar
- Weiser84. Weiser, M., "Program slicing," IEEE Transactions on Software Engineering SE-10(4) pp. 352--357 (July 1984).]]Google ScholarDigital Library
Index Terms
- Interprocedural slicing using dependence graphs
Recommendations
Interprocedural slicing using dependence graphs
PLDI '88: Proceedings of the ACM SIGPLAN 1988 conference on Programming language design and implementationA slice of a program with respect to a program point p and variable x consists of all statements of the program that might affect the value of x at point p. This paper concerns the problem of interprocedural slicing — generating a slice of an entire ...
Interprocedural slicing using dependence graphs
Proceedings of the SIGPLAN '88 conference on Programming language design and implementationA slice of a program with respect to a program point p and variable x consists of all statements of the program that might affect the value of x at point p. This paper concerns the problem of interprocedural slicing — generating a slice of an entire ...
Interprocedural slicing using dependence graphs
The notion of a program slice, originally introduced by Mark Weiser, is useful in program debugging, automatic parallelization, and program integration. A slice of a program is taken with respect to a program point p and a variable x; the slice consists ...
Comments