skip to main content
10.1145/53990.53994acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free Access

Interprocedural slicing using dependence graphs

Published:01 June 1988Publication History

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.

References

  1. Babich78.Babich, W.A. and Jazayeri, M., "The method of attributes for data flow analysis: Part IL Demand analysis," Acts Informatica 10(3)pp. 265-272 (October 1978).Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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-3 l, 1979), ACM, New York (1979). Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. Cooper88.Cooper, K.D. and Kennedy, K., .Interproceduml side-effect analysis in linear time," Proceedings of the ACM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, lune 22-24, 1988), ACM SIGPLANNotices, (June 1988). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Ferrante87.Ferrante, J., Ottenstein, K., and Warren, J., "The program delmndence graph and its use in optimization," ACM Transactions on Programruing Languages and Systems 9(3) pp. 319-349 (July 1987). Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle Scholar
  7. Horwitz88.Horwitz, S., Prins, J., and Reps, T., "Inmgrating 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 0988). Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Horwitz88a.Horwitz, S., Reps, T., and Binldey, D., .lnterprocedural slicing using dependence graphs," TR-756, Caxtputer Sciences Department, University of Wisconsin, Madison, WI (March 1988).Google ScholarGoogle Scholar
  9. Kastens80.Kastens, U., .Ordered attribute grammars," Acta Inf. 13(3)pp. 229- 256 (1980).Google ScholarGoogle Scholar
  10. Knuth68.Knuth, D.E., "Semantics of context-free languages," Math. $yst. Theory 2(2) pp. 127-145 (June 1968).Google ScholarGoogle ScholarCross RefCross Ref
  11. Kou77.Kou, L.T., "On live-dead analysis for global data flow problenas," Journal ofthe ACM 24(3) pp. 473-483 (iluly 1977). Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Kuck72.Kuek, D.J., Muraoka, Y., and Chert, S.C., "On the number of operations simultaneously executable in FORTRAN-like programs and their resulting speed-up," 1EEE Trans. on Computers C-21(12)pp. 1293-1310 (December 1972).Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ottenstein84.Ottenstein, K.J. and Ouenstein, L.M., "The program dependence graph in a software develognnent environment," Proceedings of the ACM $1GSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, (Pittsburgh, PA, Apr. 23-25, 1984), ACM $IGPLAN Notices 19(5) pp. 177-184 (May 1984). Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle Scholar
  16. Waite83.Waite, W.M. and Goos, G., Compiler Construction, Springer-Verlag, New York (1983). Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Weiser84.Weiser, M., "Program slicing," IEEE Transactions on Software Engineering SE-10(4) pp. 352-357 (July 1984).Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Interprocedural slicing using dependence graphs

    Recommendations

    Comments

    Login options

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

    Sign in
    • Published in

      cover image ACM Conferences
      PLDI '88: Proceedings of the ACM SIGPLAN 1988 conference on Programming language design and implementation
      June 1988
      338 pages
      ISBN:0897912691
      DOI:10.1145/53990
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 23, Issue 7
        Proceedings of the SIGPLAN '88 conference on Programming language design and implementation
        July 1988
        338 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/960116
        Issue’s Table of Contents

      Copyright © 1988 ACM

      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 1 June 1988

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate406of2,067submissions,20%

      Upcoming Conference

      PLDI '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader