skip to main content
10.1145/353171.353190acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article
Free Access

Scalable propagation-based call graph construction algorithms

Authors Info & Claims
Published:01 October 2000Publication History

ABSTRACT

Propagation-based call graph construction algorithms have been studied intensively in the 199Os, and differ primarily in the number of sets that are used to approximate run-time values of expressions. In practice, algorithms such as RTA that use a single set for the whole program scale well. The scalability of algorithms such as 0-CFA that use one set per expression remains doubtful.In this paper, we investigate the design space between RTA and 0-CFA. We have implemented various novel algorithms in the context of Jax, an application extractor for Java, and shown that they all scale to a 325,000-line program. A key property of these algorithms is that they do not analyze values on the run-time stack, which makes them efficient and easy to implement. Surprisingly, for detecting unreachable methods, the inexpensive RTA algorithm does almost as well as the seemingly more powerful algorithms. However, for determining call sites with a single target, one of our new algorithms obtains the current best tradeoff between speed and precision.

References

  1. 1.AGESEN, O. Constraint-based type inference and parametric polymorphism. Proceedings of the First International Static Analysis Symposium (SAS'94) (September 1994), 78-100. Springer-Verlag LNCS vol. 864.Google ScholarGoogle ScholarCross RefCross Ref
  2. 2.AGESEN, O. Concrete Type Inference: Delivering Object-Oriented Applications. PhD thesis, Stanford University, December 1995. Appeared as Sun Microsystems Laboratories Technical Report SMLI TR-96-52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.ANDERSEN, L. O. Self-applicable C program specialization. In Proceedings of PEPM'92, Workshop on Partial Evaluation and Semantics-Based Program Manipulation (June 1992), pp. 54-61. (Technical Report YALEU/DCS/RR-909, Yale University).Google ScholarGoogle Scholar
  4. 4.ASHLEY, J. M. A practical and flexible flow analysis for higher-order languages. In Proceedings of POPL '96, 23nd Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1996), pp. 184-194. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.BACON, D. F. Fast and Effective Optimization of Statically Typed Object-Oriented Languages. PhD thesis, Computer Science Division, University of California, Berkeley, Dec. 1997. Report No. UCB/CSD-98-1017. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.BACON, D. F., AND SWEENEY, P. F. Fast static analysis of C++ virtual function calls. In Proceedings of the Eleventh Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'96) (San Jose, CA, 1996), pp. 324-341. SIGPLAN Notices 31(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.CALDER, B., AND GRUNWALD, D. Reducing indirect function call overhead in C++ programs. Conference Record of the Twenty-First A CM Symposium on Principles of Programming Languages (January 1994), 397-408. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.CONSEL, C. A tour of Schism: A partial evaluation system for higher-order applicative languages. In Proceedings of PEPM'93, Second ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (1993), pp. 145-154. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.DEAN, J., AND CHAMBERS, C. Optimization of object-oriented programs using static class hierarchy analysis. Tech. Rep. 94-12-01, Department of Computer Science, University of Washington at Seattle, December 1994.Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.DEAN, J., GROVE, D., AND CHAMBERS, C. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the Ninth European Conference on Object-Oriented Programming (ECOOP'95) (Aarhus, Denmark, Aug. 1995), W. Olthoff, Bd., Springer-Verlag, pp. 77-101. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.DEFouw, G., GROVE, D., AND CHAMBERS, C. Fast interprocedural class analysis. In Conference Record of the Twenty-Fifth ACM Symposium on Principles of Programming Languages (San Diego, CA, January 1998), pp. 222-236. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.EMhm, M., GHIYA, R., AND HENDREN, L. J. Context-sensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of ACM SIGPLAN 1994 Conference on Programming Language Design and Implementation (1994), pp. 242-256. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.FAHNDRICH, M., AND AIKBN, A. Program analysis using mixed term and set constraints. In Proceedings of SAS'97, International Static Analysis Symposium (1997), Springer-Verlag (LNCS), pp. 114-126. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.FAHNDRICH, M., FOSTER, J. S., Su, Z., AND AIKEN, A. Partial online cycle elimination in inclusion constraint graphs. In Proceedings of ACM SIGPLAN 1998 Conference on Programming Language Design and Implementation (1998), pp. 85-96. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.FOSTER, J. S., FAHNDRICH, M., AND AIKBN, A. Polymorphic versus monomorphic flow-insensitive points-to analysis for C. In Proceedings of SAS 2000, 7th Static Analysis Symposium (2000), J. Palsberg, Ed., pp. 175-198. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.COLDBBRG, A., AND ROBSON, D. Smalltalk-80--The Language and its Implementation. Addison-Wesley, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.GROVE, D., DEFouw, G., DEAN, J., AND CHAMBERS, C. Call graph construction in object-oriented languages. In Proceedings of the Twelfth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'97) (Atlanta, GA, 1997), pp. 108-124. SIGPLAN Notices 32(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.GROVE, D., DEFouw, G., DEAN, J., AND CHAMBERS, C. Call graph construction in object-oriented languages. In Proceedings of OOPSLA'97, ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (1997), pp. 108-124. SIGPLAN Notices 32(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.HBINTZB, N. Set-based analysis of ML programs. In Proceedings of ACM Conference on LISP and Functional Programming (1994), pp. 306-317. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.HBNGLBIN, F. Dynamic typing. In Proceedings of ESOP'9$, European Symposium on Programming (1992), Springer-Verlag (LNCS 582), pp. 233-253. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.ISHIZAKI, i., KAWAHITO, M., YASUB, T., KOMATSU, H., AND NAKATANI, T. A study of devirtualization techniques for a Java just-in-time compiler. In Proceedings of the Fifteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA '00) (Minneapolis, Minnesota), 2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.ISHIZAKI, K., KAWAHITO, M., YASUB, T., TAKBUCHI, M., OGASAWARA, T., SUGANUMA, T., ONODBRA, T., KOMATSU, H., AND NAKATANI, T. Design, implementation, and evaluation of optimizations in a just-in-time compiler. In Proceedings of the ACM SIGPLAN JavaGrande Conference (San Francisco, CA, June 1999). Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.JAGANNATHAN, S., AND WEEKS, S. A unified treatment of flow analysis in higher-order languages. In Proceedings of POPL'95, and Annual SIGPLAN-SIGA CT Symposium on Principles of Programming Languages (1995), pp. 393-407. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.JAGANNATHAN, S., AND WRIGHT, A. Effective flow analysis for avoiding run-time checks. In Proceedings of SAS'95, International Static Analysis Symposium (Glasgow, Scotland, September 1995), Springer-Verlag (LNCS 983). Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.JONES, N., AND MUCHNICK, S. A flexible approach to interprocedural data flow analysis of programs with recursive data structures. In Ninth Symposium on Principles of Programming Languages (1982), pp. 66-74. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.NIELSON, F., AND NIBLSON, H. R. Infinitary control flow analysis: A collecting semantics for closure analysis. In Proceedings of POPL'97, 24th Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (1997), pp. 332-345. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.OXHOJ, N., PALSBERG, J., AND SCHVVARTZBACH, M. I. Making type inference practical. In Proceedings of ECOOP'92, Sixth European Conference on Object-Oriented Programming (Utrecht, The Netherlands, July 1992), Springer-Verlag (LNCS 615), pp. 329-349. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.PALSBBRG, J., AND SCHWARTZBACH, M. Object-Oriented Type Systems. John Wiley & Sons, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.PALSBERG, J., AND SCHWARTZBACH, M. I. Object-oriented type inference. In Proceedings of OOPSLA '91, ACM SIGPLAN Sixth Annual Conference on Object-Oriented Programming Systems, Languages and Applications (Phoenix, Arizona, October 1991), pp. 146-161. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 30.SOHMIDT, D. Natural-semantics-based abstract interpretation. In Proceedings of SAS'95, International Static Analysis Symposium (Glasgow, Scotland, September 1995), Springer-Verlag (LNCS 983). Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. 31.SHAPIRO, M., AND HORWITZ, S. Fast and accurate flow-insensitive points-to analysis. In Conference Record of the Twenty-Fourth ACM Symposium on Principles of Programming Languages (Paris, France, 1997), pp. 1-14. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 32.SHARIR, M., AND PNUELI, A. Two approaches to interprocedural data flow analysis. In Program Flow Analysis, Theory and Applications, S. Muchnick and N. Jones, Eds. 1981.Google ScholarGoogle Scholar
  33. 33.SHIVERS, O. Control-Flow Analysis of Higher-Order Languages. PhD thesis, CMU, May 1991. CMU-CS-91-145. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 34.SRIVASTAVA, A. Unreachable procedures in object oriented programming. A CM Letters on Programming Languages and Systems 1, 4 (December 1992), 355-364. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. 35.STBBNSGAARD, S. Points-to analysis in almost linear time. In Proceedings of the Twenty-Third ACM Symposium on Principles of Programming Languages (St. Petersburg, FL, January 1996), pp. 32-41. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. 36.STEFANESCU, D., AND ZHOU, Y. An equational framework for flow analysis of higher-order functional programs. In Proceedings of ACM Conference on LISP and Functional Programming (1994), pp. 318-327. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 37.Su, Z., FAHNDRICH, M., AND AIKEN, A. Projection merging: Reducing redundancies in inclusion constraint graphs. In Proceedings of POPL '00, and Annual SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2000), pp. 81-95. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. 38.SUNDARBSAN, V., HBNDRBN, L., RAZAFIMAHBFA, C., VALLBE-RAI, R., LAM, P., CAGNON, E., AND CODIN, C. Practical virtual method call resolution for Java. In Proceedings of the Fifteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA '00) (Minneapolis, Minnesota), 2000). Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. 39.SWBBNBY, P. F., AND TIP, F. Extracting library-based object-oriented applications. In Proceedings of the Eighth International Symposium on the Foundations of Software Engineering (FSE-8) (November 2000). To appear. A previous version of this paper appeared as IBM Research Report RC 21596, November 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. 40.TIP, F., LAB'FRA, C., SWBBNBY, P. F., AND STRBBTBR, D. Practical experience with an application extractor for Java. In Proceedings of the Fourteenth Annual Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA'99) (Denver, CO), 1999), pp. 292-305. SIGPLAN Notices 34(10). Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 41.VALLE,-RAI, R., CAGNON, E., HBNDRBN, L., LAM, P., POMINVILLE, P., AND SUNDARESAN, V. Optimizing java hytecode using the soot framework: Is it feasible? In Proceedings of CC'00, International Conference on Compiler Construction (2000), Springer-Verlag (LNCS).Google ScholarGoogle Scholar
  42. 42.VITBK, J., HORSPOOL, R. N., AND KRALL, A. Efficient type inclusion tests. In Proceedings of OOPSLA '97, A CM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (1997), pp. 142-157. SIGPLAN Notices 32(10). Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Scalable propagation-based call graph construction algorithms

          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
            OOPSLA '00: Proceedings of the 15th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
            October 2000
            402 pages
            ISBN:158113200X
            DOI:10.1145/353171

            Copyright © 2000 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 October 2000

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            Overall Acceptance Rate268of1,244submissions,22%

            Upcoming Conference

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader