skip to main content
10.1145/199448.199462acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article
Free Access

Precise interprocedural dataflow analysis via graph reachability

Authors Info & Claims
Published:25 January 1995Publication History

ABSTRACT

The paper shows how a large class of interprocedural dataflow-analysis problems can be solved precisely in polynomial time by transforming them into a special kind of graph-reachability problem. The only restrictions are that the set of dataflow facts must be a finite set, and that the dataflow functions must distribute over the confluence operator (either union or intersection). This class of probable problems includes—but is not limited to—the classical separable problems (also known as “gen/kill” or “bit-vector” problems)—e.g., reaching definitions, available expressions, and live variables. In addition, the class of problems that our techniques handle includes many non-separable problems, including truly-live variables, copy constant propagation, and possibly-uninitialized variables.

Results are reported from a preliminary experimental study of C programs (for the problem of finding possibly-uninitialized variables).

References

  1. 1.Aho, A.V., Hopcroft, J.E., and Ullman, J.D., The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA (1974).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Aho, A.V., Ganapathi, M., and Tjiang, S.W.K., "Code generation using tree matching and dynamic programming," A CM Trans. Program. Lang. Syst. 11(4) pp. 491-516 (October 1989).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.Baker, B., "An algorithm for structuring flowgraphs," J. A CM 24(1) pp. 98-120 (January 1977).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.Cai, J, and Paige, R., "Program derivation by fixed point computation," Science of Computer Programming 11 pp. 197-261 (1988/89).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.Callahan, D., Cooper, K.D., Kennedy, K., and Torczon, L., "Interprocedural constant propagation," Proceedings of the SIGPLAN 86 Symposium on Compiler Construction, (Palo Alto, CA, June 25-27, 1986), ACM SIGPLAN Notices 21(7) pp. 152-i61 (July 1986).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.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 23(7)pp. 47-56 (July 1988).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Cooper, K.D, and Kennedy, K., "Interprocedural side-effect analysis in linear time," Proceedings of the A CM SIGPLAN 88 Conference on Programming Language Design and Implementation, (Atlanta, GA, June 22-24, 1988), ACM SIGPLAN Notices 23(7)pp. 57-66 (July 1988).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Cooper, K.D. and Kennedy, K., "Fast interprocedural alias analysis," pp. 49-59 in Conference Record of the Sixteenth ACM Symposium on Principles of Programming Languages, (Austin, TX, Jan. I1-i3, 1989), ACM, New York, NY (1989).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.Cousot, P. and Cousot, R., "Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints," pp. 238-252 in Conference Record of the Fourth A CM Symposium on Principles of Programming Languages, (Los Angeles, CA, January 17-19, 1977), ACM, New York, NY (1977).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.Cousot, P. and Cousot, R., "Static determination of dynamic properties of recursive procedures," pp. 237-277 in Formal Descriptions of Programming Concepts, (IFIP WG 2.2, St. Andrews, Canada, August 1977), ed. E.J. Neuhold,North-Holland, New York, NY (1978).]]Google ScholarGoogle Scholar
  11. 11.Duesterwald, E., Gupta, R., and Soffa, M.L., "Demand-driven computation of interprocedural data flow," in Conference Record of the Twenty-Second A CM Symposium on Principles of Programming Languages, (San Francisco, CA, Jan. 23-25, 1995), ACM, New York, NY (1995). (To appear.)]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.Fischer, C.N. and LeBlanc, R.J., Crafting a Compiler, Benjamin/Cummings Publishing Company, Inc., Menlo Park, CA (1988).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Giegerich, R., Moncke, U., and Wilhelm, R., "Invariance of approximative semantics with respect to program transformation," pp. 1-10 in Informatik-Fachberichte 50, Springer-Verlag, New York, NY (1981).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.Grove, D. and Torczon, L., "Interprocedural constant propagation: A study of jump function implementation," pp. 90-99 in Proceedings of the A CM SIGPLAN 93 Conference on Programming Language Design and Implementation, (Albuquerque, NM, June 23-25, 1993), ACM, New York, NY (1993).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.Holley, L.H. and Rosen, B.K., "Qualified data flow problems," IEEE Transactions on Software Engineering SE-7(1)pp. 60-78 (January 1981).]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.Horwitz, S., Reps, T., and Binkley, D., "Interprocedural slicing using dependence graphs," ACM Trans. Program. Lang. Syst. 12(1)pp. 26-60 (January 1990).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.Horwitz, S., Reps, T., and Sagiv, M., "Demand interprocedural dataflow analysis," Unpublished Report, Computer Sciences Department, University of Wisconsin, Madison, WI 0. (In preparation.)]]Google ScholarGoogle Scholar
  18. 18.Jones, N.D. and Mycroft, A., "Data flow analysis of applicative programs using minimal function graphs," pp. 296-306 in Conference Record of the Thirteenth A CM Symposium on Principles of Programming Languages, (St. Petersburg, FL, Jan. 13-15, 1986), ACM, New York, NY (1986).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.Kernighan, B.W., "Ratfor- A preprocessor for a rational Fortran," Software- Practice & Experience 5(4) pp. 395-406 (1975).]]Google ScholarGoogle ScholarCross RefCross Ref
  20. 20.Kildall, G., "A unified approach to global program optimization," pp. 194-206 in Conference Record of the First ACM Symposium on Principles of Programming Languages, ACM, New York, NY (1973).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.Knoop, J. and Steffen, B., "The interprocedural coincidence theorem," pp. 125-140 in Proceedings of the Fourth International Conference on Compiler Construction, (Paderborn, FRG, October 5- 7, 1992), Lecture Notes in Computer Science, Vol. 641, ed. U. Kastens and P. Pfahler, Springer-Vedag, New York, NY (1992).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.Knoop, J. and Steffen, B., "Efficient and optimal bit-vector data flow analyses: A uniform interprocedural framework," Bericht Nr. 9309, Institut fuer Informatik und Praktische Mathematik, Christian- Albrechts-Universitaet zu Kiel, KieI, Germany (April 1993).]]Google ScholarGoogle Scholar
  23. 23.Kou, L.T., "On live-dead analysis for global data flow problems," Journal of the ACM 24(3) pp. 473-483 (July 1977).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.Landi, W. and Ryder, B.G., "Pointer-induced aliasing: A problem classification," pp. 93-103 in Conference Record of the Eighteenth ACM Symposium on Principles of Programming Languages, (Orlando, FL, January 1991), ACM, New York, NY (1991).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.Nielson, F. and Nielson, H.R., "Finiteness conditions for fixed point iteration," in Conference Record of the 1992 A CM Symposium on Lisp and Functional Programming, (San Francisco, CA, June 22-24 1992), ACM, New York, NY (1992).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.Nielson, H.R. and Nielson, F., "Bounded fixed point iteration," pp. 71-82 in Conference Record of the Nineteenth ACM Symposium on Principles of Programming Languages, (Albuquerque, NM, January 1992), ACM, New York, NY (1992).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.Reps, T., Sagiv, M., and Horwitz, S., "Interprocedural dataflow analysis via graph reachability," TR 94-14, Datalogisk Institut, University of Copenhagen, Copenhagen, Denmark (April 1994). (Available through World Wide Web at ftp://ftp.diku.dk/diku/semantics/papers/D-215.ps.Z.)]]Google ScholarGoogle Scholar
  28. 28.Reps, T., Horwitz, S., Sagiv, M., and Rosay, G., "Speeding up slicing," SIGSOFT 94: Proceedings of the Second ACM SIGSOFT Symposium on the Foundations of Software Engineering, (New Orleans, LA, December 7-9, 1994), ACM SIGSOFT Software Engineering Notes 19(December 1994). (To appear.)]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.Reps, T., "Solving demand versions of interprocedural analysis problems," pp. 389-403 in Proceedings of the Fifth International Conference on Compiler Construction, (Edinburgh, Scotland, April 7-9, 1994), Lecture Notes in Computer Science, Vol. 786, ed. P. Fritzson,Springer-Verlag, New York, NY (1994).]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.Sagiv, M., Reps, T., and Horwitz, S., "Precise interprocedural dataflow analysis with applications to constant propagation," Unpublished Report, Comp. Sci. Dept., Univ. of Wisconsin, Madison, WI (Oct. 1994). (Submitted for conference publication.)]]Google ScholarGoogle Scholar
  31. 31.Sharir, M. and Pnueli, A., "Two approaches to interprocedural data flow analysis," pp. 189-233 in Program Flow Analysis: Theory and Applications, ed. S.S. Muchnick and N.D. Jones,Prentice-Hall, Englewood Cliffs, NJ (1981).]]Google ScholarGoogle Scholar
  32. 32.Zadeck, F.K., "Incremental data flow analysis in a structured program editor," Proceedings of the SIGPLAN 84 Symposium on Compiler Construction, (Montreal, Can., June 20-22, 1984), ACM SIGPLAN Notices 19(6)pp. 132-143 (june 1984).]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Precise interprocedural dataflow analysis via graph reachability

              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
                POPL '95: Proceedings of the 22nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
                January 1995
                415 pages
                ISBN:0897916921
                DOI:10.1145/199448

                Copyright © 1995 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: 25 January 1995

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                Overall Acceptance Rate824of4,130submissions,20%

                Upcoming Conference

                POPL '25

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader