Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Call graph construction in object-oriented languages

Published: 09 October 1997 Publication History
  • Get Citation Alerts
  • 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]
    Ole Agosen. Constraint-Based Type inference and Pa/ametrie Polymorphism. In First International Static Analysis Symposium, September 1994.
    [2]
    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.
    [3]
    Olo Agesen. Concrete Type Inference: Delivering Object-Oriented Applications. Phi) thesis, Stanford, January 1996. SLMI TR 96-52.
    [4]
    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.
    [5]
    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.
    [6]
    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.
    [7]
    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.
    [8]
    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.
    [9]
    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.
    [10]
    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.
    [11]
    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.
    [12]
    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.
    [13]
    Jeffrey Dean. Whole Program Optim~zatlon of Ob. ject-Oriented Languages. PhD thesis, University of Washington, November 1996. TR-96-11-05.
    [14]
    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.
    [15]
    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.
    [16]
    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.
    [17]
    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.
    [18]
    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 ....
    [19]
    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.
    [20]
    James Gosling, Bill Joy, and Guy Steele. The Java Language Specification. Addison-Wesley, Reading, MA, 1996. - -
    [21]
    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.
    [22]
    Mary W. Hall and Ken Kennedy. Efficient Call Graph Analysis. A CM Letters on Programming Languages and Systems, 1 (3):227-242, September 1992. ... ---
    [23]
    Urs Htilzle and Ole Agesen. Dy_narnie vs. Static Optimization Techniques for Object-Oriented Languages. Theory and Practice of Object Systems, i(3), 1996._
    [24]
    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.
    [25]
    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. . ;
    [26]
    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.
    [27]
    John B. Kam and Jeffrey D. Ullman. Global data flow analysis and iterative algorithms. Journal of the ACM, 23(1):158-171, January 1976.
    [28]
    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.
    [29]
    David Kranz. ORBIT: An Optimizing Compiler for Scheme. PhD thesis, Yale University, February 1988. Department of Computer Science, Research Report 632.
    [30]
    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.
    [31]
    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.
    [32]
    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. ~
    [33]
    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. '
    [34]
    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.
    [35]
    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.
    [36]
    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.
    [37]
    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.
    [38]
    John plevyak. Optimization of Object-Oriented and Concurrent Programs. PhD thesis, University of iI!inois at Urbana-Champaign, 1996.
    [39]
    Barbara Ryder. Constructing the Call Graph of a Program. IEEETransactions on Software Engineering, 5(3):216- 225, 1979.
    [40]
    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. - -
    [41]
    Olin Shivers. Control-Flow Analysis of Higher-Order Languages~ PhD thesis, Carnegie Mellon University, May~ 1991. CMU-CS-91-145., '
    [42]
    Olin Shivers. Data Flow Analysis and Type Recovery in Scheme. In Topics in Advanced Language Implementation. M1T Press, 1991. Edited by Peter Lee. -
    [43]
    Bjarne Steensgaard. A Polyvariant Closure Analysis with Dynamic Abstraction. Unpublished manuscript, 1994.
    [44]
    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.
    [45]
    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.
    [46]
    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.

    Cited By

    View all
    • (2024)Efficient Construction of Practical Python Call Graphs with Entity Knowledge BaseInternational Journal of Software Engineering and Knowledge Engineering10.1142/S021819402450010434:07(999-1024)Online publication date: 22-May-2024
    • (2024)Semantic Code Graph—An Information Model to Facilitate Software ComprehensionIEEE Access10.1109/ACCESS.2024.335184512(27279-27310)Online publication date: 2024
    • (2023)WasmA: A Static WebAssembly Analysis Framework for Everyone2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER56733.2023.00085(753-757)Online publication date: Mar-2023
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 32, Issue 10
    Oct. 1997
    344 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/263700
    Issue’s Table of Contents
    • 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
    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: 09 October 1997
    Published in SIGPLAN Volume 32, Issue 10

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)425
    • Downloads (Last 6 weeks)34
    Reflects downloads up to 26 Jul 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)Efficient Construction of Practical Python Call Graphs with Entity Knowledge BaseInternational Journal of Software Engineering and Knowledge Engineering10.1142/S021819402450010434:07(999-1024)Online publication date: 22-May-2024
    • (2024)Semantic Code Graph—An Information Model to Facilitate Software ComprehensionIEEE Access10.1109/ACCESS.2024.335184512(27279-27310)Online publication date: 2024
    • (2023)WasmA: A Static WebAssembly Analysis Framework for Everyone2023 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER56733.2023.00085(753-757)Online publication date: Mar-2023
    • (2022)An Evaluation of Graph Databases and Object-Graph Mappers in CIDOC CRM-Compliant Digital ArchivesJournal on Computing and Cultural Heritage 10.1145/348584715:3(1-18)Online publication date: 16-Sep-2022
    • (2022)Defect prediction using deep learning with Network Portrait Divergence for software evolutionEmpirical Software Engineering10.1007/s10664-022-10147-027:5Online publication date: 1-Sep-2022
    • (2021)Generation and Visualization of Static Function Call Graph for Large C CodebasesInternational Journal of Soft Computing and Engineering10.35940/ijsce.F3507.071062110:6(1-6)Online publication date: 30-Jul-2021
    • (2021)Visualizing Hierarchical Performance Profiles of Parallel Codes Using CallFlowIEEE Transactions on Visualization and Computer Graphics10.1109/TVCG.2019.295374627:4(2455-2468)Online publication date: 1-Apr-2021
    • (2021)Facilitating program comprehension with call graph multilevel hierarchical abstractionsJournal of Systems and Software10.1016/j.jss.2021.110945176(110945)Online publication date: Jul-2021
    • (2020)Tools for top-down performance analysis of GPU-accelerated applicationsProceedings of the 34th ACM International Conference on Supercomputing10.1145/3392717.3392752(1-12)Online publication date: 29-Jun-2020
    • (2019)Static call graph construction in AWS Lambda serverless applicationsProceedings of the 11th USENIX Conference on Hot Topics in Cloud Computing10.5555/3357034.3357059(20-20)Online publication date: 8-Jul-2019
    • Show More Cited By

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media