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

Call graph construction in object-oriented languages

Authors Info & Claims
Published:09 October 1997Publication History

ABSTRACT

Interprocedural analyses enable optimizing compilers to more precisely model the effects of non-inlined procedure calls, potentially resulting in substantial increases in application performance. Applying interprocedural analysis to programs written in object-oriented or functional languages is complicated by the difficulty of constructing an accurate program call graph. This paper presents a parameterized algorithmic framework for call graph construction in the presence of message sends and/or first class functions. We use this framework to describe and to implement a number of well-known and new algorithms. We then empirically assess these algorithms by applying them to a suite of medium-sized programs written in Cecil and Java, reporting on the relative cost of the analyses, the relative precision of the constructed call graphs, and the impact of this precision on the effectiveness of a number of interprocedural optimizations.

References

  1. Agesen 94.Ole Agosen. Constraint-Based Type inference and Pa/ametrie Polymorphism. In First International Static Analysis Symposium, September 1994.Google ScholarGoogle Scholar
  2. Agesen 95.Ole Age.sen. The Cartesian Product Algorithm: Simple and Precise Type Inference of Parametric Polymorphtsm, In Proceedings ECOOP '95, Aarhus, Denmark, August 1995, Spfinger-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Agesen 96.Olo Agesen. Concrete Type Inference: Delivering Object-Oriented Applications. Phi) thesis, Stanford, January 1996. SLMI TR 96-52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Alt & Martin 95.Martin Aft and Flofian M~tin. Generation of ~ffi. cient interprocedurai'analyzers with PAG. In Proceedings of the Second International Symposium on Static Analysis, pages 33-50. Spfinger-Verlag, September 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bacon & Sweeney 96.David F. Bacon and Peter F. Sweenoy, Fast Static Analysis of C++ Virtual Function Calls. In OOPSLA'96 Conference Proceedings, San Jose, CA, October 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bracha & Griswold 93.Gilad Braeha and David Griswold, Strongtalk: Type.checking Smalltalk in a Production Environment, In Proceedings OOPSLA '93, pages 215-230, October 1993, Published as ACM SIGPLAN Notices, volume 28, number I0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Callahan et al90.David Callahan, Alan Carle, Mary W. Hall, and Ken Kennedy. Constructing the Procedure Call Multigraph. IEEE Transactions on Software Engineering, 16(4):483.-487, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Chambers & Ungar 89.Craig Chambers and David gngar. Customlzation: Optimizing Compiler Technology for Self, A Dynamically-Typed Object-Oriented Programming Language, SIGPLAN Notices, 24(7):146--160, July 1989. In Proceedings of the ACM SIGPLAN '89 Conference on Programming Language Design and implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Chambers & Ungar 90.Craig Chambers and David Ungar, lteratlvo Type Analysis and Extended Message Splitting: Optimizing Dynamically-Typed Object-Oriented Programs. SIGPLAN Notices, 25(6):150--164, June 1990. In Proceedings of the ACM SIGPLAN '90 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Chambers 93.Craig Chambers. The Cecil Language: Specification and Rationale. Technical Report TR-93-03-05, Department of Computer Science and Engineering. University of Washington, March 1993.Google ScholarGoogle Scholar
  11. Cooper et al 92.Keith D. Cooper, Mary W. Hall, and Ken Kennedy, Procedure Cloning. In Proceedings of 1992 IEEE lnternation, al Conference on Computer Languages, pages 96--105, Oakland, CA, April 1992.Google ScholarGoogle ScholarCross RefCross Ref
  12. Cousot & Cousot 77.Patrick Cousot and Radhia Cousot. Abstract Interpretation: A Unified Lattice Model for Static Analysis of Programs by Construction or Approximation of Fixpoints, In Conference Record of the Fourth A CM Symposium on Prin~l. ties of Programming Languages, pages 238-252, Los Angelens, California, January 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Dean 96.Jeffrey Dean. Whole Program Optim~zatlon of Ob. ject-Oriented Languages. PhD thesis, University of Washington, November 1996. TR-96-11-05. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Dean et al 95.Jeffrey Dean, David Grove, and Craig Chambers, Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis. In Proceedings ECOOP '95, Aarhus, Denmark, August 1995. Springer-.Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Dean et al 96.Jeffrey Dean; Greg DeFouw, Dave Grove, Vassily Litvinov, and Craig Chambers. Vortex: An Optimizing Compiler for Object-Oriented Languages. In OOPSLA'96 Confer. ence Proceedings, San Jose, CA, October 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. DeFouw et al 97.Greg DeFouw, David Grove, and Craig Chambers. Fast Interprocedural Class Analysis. Technical Report TR-97- 07-02, Department of Computer Science and Engineering. University of Washington, July 1997.Google ScholarGoogle Scholar
  17. Deutsch & Schiffman 84.L. Peter Deutsch and Allan M. Schiffinan. Efficient Implementation of the Smalltalk-80 System. In Conference Record of the Eleventh Annual ACM Symposium on Principles of Programming Languages, pages 297'-302, Salt Lake City, Utah, January 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Diwan et al 96.Amer Diwan, Eliot Moss, ~md Ka~jn MeKinley( Simple and Effective Analysis of Statically-typed Object-Offented Programs. In OOPSLA'96 Conference Proceedings, San Jose, CA, October 1996 .... Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Emami et al 94.Maryam Emami, Rakesh Ghiya, and Laurie J.'Hendren. Context-Sensitive Interprocedural Points-to Analysis in the Presence of Function Pointers. SIGPLAN Notices, 29(6):242-256, June 1994. In Proceedings of the ACM SIG- PLAN '94 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Gosling et al, 96.James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, Reading, MA, 1996. - - Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Grove et al 95.David Grove, Jeffrey Dean, Charles Garrett,-and Craig Chambers. Profile-Guided Receiver class Prediction. In OOPSLA'95 Conference Proceedings, pages 108-!23, _ Austin, TX, October 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hall & Kennedy 92.Mary W. Hall and Ken Kennedy. Efficient Call Graph Analysis. A CM Letters on Programming Languages and Systems, 1 (3):227-242, September 1992. ... --- Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Hölzle & Agesen 96.Urs Htilzle and Ole Agesen. Dy_narnie vs. Static Optimization Techniques for Object-Oriented Languages. Theory and Practice of Object Systems, i(3), 1996._Google ScholarGoogle Scholar
  24. Hölzle & Ungar 94.Urs Hrlzle and David Ungar. Optimizing Dynamically-Dispatched Calls with Run-Time Type Feedback. " SIGPLANNotices, 29(6):326-336, June 1994. In Proceedings of the ACM SIGPLAN '94 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Jagannathan & Weeks 95.Suresh Jagannathan and Stephen Weeks. A Unified Framework of Flow Analysis in Higher-Order LanguageL In Conference Record of POPL '95: 22ndACM SIG- PLAN-SIGA CT Symposium on Principles of- Programming Languages, pages 393--407, January 1995. . ; Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Johnson 88.Ralph Johnson. TS: AN Optimizing Compiler for Smalltalk. In Proceedings OOPSLA '88', pages 18--26, November 1988. Published as ACM SIGPLAN Notices,~,,olume 23, number 11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Kam & Ullman 76.John B. Kam and Jeffrey D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158-171, January 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Kildall 73.Gary A. Kildall. A Unified Approach to Global Program Optimization. In Conference Record of the A CM Symposium on Principles of Programming Languages, pages 194- 206, Boston, Massachusetts, October 1973. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Kranz 88.David Kranz. ORBIT: An Optimizing Compiler for Scheme. PhD thesis, Yale University, February 1988. Department of Computer Science, Research Report 632. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Lakhotia 93.Arun Lakhotia. Constructing Call Multigraphs Using Dependence Graphs. In Conference Record of the Twentieth Annual A CM SIGPLAN-SIGA CT Symposium on Principles of Programming Languages, pages 273-284, Charleston, South Carolina, January 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Landi et al 93.William Landi, Barbara G. Ryder, and Sean Zhang. Interprocedural Side Effect Analysis With Pointer Aliasing. SIGPLANNotices, 28(6):56--67, June 1993. In Proceedings of the ACM SIGPLAN '93 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Nielson & Nielson 97.Flemmi'ng Nielson and Hanne Riis Nielson. Infinitary Control Flow Analysis: a Collecting Semantics for Closure Analysis. In Conference Record of POPL '97: 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages; pages 332--345, Paris, France, January 1997. ~ Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Odersky & Wadler 97.Martin Odersky and Philip Wadler. Pizza into Java: Translating-theory into practice. In Conference Record of POPL "97: 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programmih-g Languages, pages 146-159, Pads, France, January 1997. ' Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Oxhøj etal 92.Nicholas Oxh~j, Jens Palsberg, and Michael I.' Schwartzbach:-Making' Type~Inference~- Practical. In O.Lehrmann Madsen, editor, Proceedings ECOOP '92,, ENCS 615,-pages 329-349, Utrecht, The Netherlands, June 1992. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Palsberg & Schwartzbach 91.Jens Palsberg and Michael I. Schwartzbach. Object-Oriented Type Inference. In Proceedings OOP- SLA '91, pag'e,s 146-161, November 1991. Published as ACM SIGPLAN-Notices; volume 26, number 11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. Plevyak & Chien 94.John Plevyak and Andrew A. Chien. Precise Concrete Type Inference for Object-Oriented Languages. In Proceedings OOPSLA '94, pages 324-340, Portland, OR, Oetober 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Plevyak & Chien 95.John Plevyak and Andrew A. Chien.Type Directed Cloning for Object-Oriented Programs. In Proceedings of the Workshop for Lan'guages and Compilers for Parallel Computing, pages 566--5.80, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. plevyak 96.John plevyak. Optimization of Object-Oriented and Concurrent Programs. PhD thesis, University of iI!inois at Urbana-Champaign, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Ryder 79.Barbara Ryder. Constructing the Call Graph of a Program. IEEETransactions on Software Engineering, 5(3):216- 225, 1979.Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Shivers 88.Olin Shivers. Control-Flow Analysis in Scheme., SIGPLAN Notices, 23(7):164-174, July 1988. In Proceedings of the ACM SIGPLAN '88 Conference on Programming Language Design and Implementation. - - Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Shivers 91a.Olin Shivers. Control-Flow Analysis of Higher-Order Languages~ PhD thesis, Carnegie Mellon University, May~ 1991. CMU-CS-91-145. , ' Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Shivers 91b.Olin Shivers. Data Flow Analysis and Type Recovery in Scheme. In Topics in Advanced Language Implementation. M1T Press, 1991. Edited by Peter Lee. -Google ScholarGoogle Scholar
  43. Steensgaard 94.Bjarne Steensgaard. A Polyvariant Closure Analysis with Dynamic Abstraction. Unpublished manuscript, 1994.Google ScholarGoogle Scholar
  44. Steensgaard 96.Bjarne Steensgaard. Points-to Analysis in Almost Linear Time. In Conference Record of POPL '96: 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 32--41, St. Petersburg, Florida, January 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Stefanescu & Zhou 94.Dan Stefanescu and Yuli Zhou. An Equational Framework for the Flow Analysis of Higher-Order Functional Programs. In Proceedings of the A CM Symposium on Lisp and Functional Programming, pages 190-198, June 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Wilson & Lam 95.Robert P. Wilson and Monica S. Lam. Efficient Context-Sensitive Pointer Analysis for C Programs. SIG- PLAN Notices, pages 1-12, June 1995. In Proceedings of the ACM SIGPLAN '95 Conference on Programming Language Design and Implementation. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Call graph construction in object-oriented languages

          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 '97: Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
            October 1997
            345 pages
            ISBN:0897919084
            DOI:10.1145/263698

            Copyright © 1997 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: 9 October 1997

            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