Evaluating a Demand Driven Technique for Call Graph Construction

With the increasing importance of just-in-time or dynamic compilation and the use of program analysis as part of software development environments, there is a need for techniques for demand driven construction of a call graph. We have developed a technique for demand driven call graph construction which handles dynamic calls due to polymorphism in object-oriented languages. Our demand driven technique has the same accuracy as the corresponding exhaustive technique. The reduction in the graph construction time depends upon the ratio of the cardinality of the set of influencing nodes and the total number of nodes in the entire program.This paper presents a detailed experimental evaluation of the benefits of the demand driven technique over the exhaustive one. We consider a number of scenarios, including resolving a single call site, resolving all call sites in a method, resolving all call sites within all methods in a class and computing reaching definitions of all actual parameters inside a method. We compare the analysis time, the number of methods analyzed and the number of nodes in the working set for the demand driven and exhaustive analyses.We use SPECJVM programs as benchmarks for our experiments. Our experiments show for the larger SPECJVM programs, javac, mpegaudio and jack, demand driven analysis on the average takes nearly an order of magnitude less time than exhaustive analysis.

[1]  Laurent Mauborgne,et al.  Abstract Interpretation Using Typed Decision Graphs , 1998, Sci. Comput. Program..

[2]  Laurie J. Hendren,et al.  Putting pointer analysis to work , 1998, POPL '98.

[3]  Thomas Reps,et al.  The Synthesizer Generator: A System for Constructing Language-Based Editors , 1988 .

[4]  Olin Shivers,et al.  The semantics of Scheme control-flow analysis , 1991, PEPM '91.

[5]  YangJun,et al.  Frequent value locality and value-centric data cache design , 2000 .

[6]  Barbara G. Ryder,et al.  Data-flow analysis of program fragments , 1999, ESEC/FSE-7.

[7]  William Maddox Semantically-Sensitive Macroprocessing , 1989 .

[8]  Todd M. Austin,et al.  The SimpleScalar tool set, version 2.0 , 1997, CARN.

[9]  Roberto Giacobazzi,et al.  Refining and Compressing Abstract Domains , 1997, ICALP.

[10]  Roberto Giacobazzi,et al.  Incompleteness, Counterexamples, and Refinements in Abstract Model-Checking , 2001, SAS.

[11]  Jun Yang,et al.  Frequent value compression in data caches , 2000, MICRO 33.

[12]  Mark Stephenson,et al.  Bidwidth analysis with application to silicon compilation , 2000, PLDI '00.

[13]  David F. Bacon,et al.  Fast static analysis of C++ virtual function calls , 1996, OOPSLA '96.

[14]  Jong-Deok Choi,et al.  A framework for interprocedural optimization in the presence of dynamic class loading , 2000, PLDI '00.

[15]  Zahira Ammarguellat,et al.  A Control-Flow Normalization Algorithm and Its Complexity , 1992, IEEE Trans. Software Eng..

[16]  William Landi,et al.  Undecidability of static analysis , 1992, LOPL.

[17]  Martin Jourdan,et al.  Attribute Grammars: a Declarative Functional Language , 1995 .

[18]  Matthias Felleisen,et al.  Componential set-based analysis , 1997, TOPL.

[19]  Barbara G. Ryder,et al.  Relevant context inference , 1999, POPL '99.

[20]  Vitaly Feldman,et al.  Sealed calls in Java packages , 2000, OOPSLA '00.

[21]  Laurie J. Hendren,et al.  Practical virtual method call resolution for Java , 2000, OOPSLA '00.

[22]  Donglin Liang,et al.  Efficient points-to analysis for whole-program analysis , 1999, ESEC/FSE-7.

[23]  Jong-Deok Choi,et al.  Interprocedural pointer alias analysis , 1999, TOPL.

[24]  Arnaud Venet,et al.  Automatic Analysis of Pointer Aliasing for Untyped Programs , 1999, Sci. Comput. Program..

[25]  Viktor Kuncak,et al.  Role analysis , 2002, POPL '02.

[26]  Cristina Cifuentes,et al.  Reverse compilation techniques , 1994 .

[27]  Jens Palsberg,et al.  Scalable propagation-based call graph construction algorithms , 2000, OOPSLA '00.

[28]  Atanas Rountev,et al.  Off-line variable substitution for scaling points-to analysis , 2000, PLDI '00.

[29]  Rajiv Gupta,et al.  A practical framework for demand-driven interprocedural data flow analysis , 1997, TOPL.

[30]  Gagan Agrawal Simultaneous demand-driven data-flow and call graph analysis , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[31]  David Grove,et al.  Call graph construction in object-oriented languages , 1997, OOPSLA '97.

[32]  Bilha Mendelson,et al.  Automatic detection of immutable fields in Java , 2000, CASCON.

[33]  Laurie J. Hendren,et al.  Efficient Inference of Static Types for Java Bytecode , 2000, SAS.

[34]  Jack W. Davidson,et al.  Memory access coalescing: a technique for eliminating redundant memory accesses , 1994, PLDI '94.

[35]  Todd A. Proebsting,et al.  Krakatoa: Decompilation in Java (Does Bytecode Reveal Source?) , 1997, COOTS.

[36]  Susan Horwitz,et al.  Precise flow-insensitive may-alias analysis is NP-hard , 1997, TOPL.

[37]  Yunheung Paek,et al.  A proof method for the correctness of modularized 0CFA , 2002, Inf. Process. Lett..

[38]  Tim Teitelbaum,et al.  Higher-order attribute grammars and editing environments , 1990, PLDI '90.

[39]  Charles Simonyi,et al.  Intentional Programming - Innovation in the Legacy Age , 1996 .

[40]  Margaret Martonosi,et al.  Dynamically exploiting narrow width operands to improve processor power and performance , 1999, Proceedings Fifth International Symposium on High-Performance Computer Architecture.

[41]  S. Doaitse Swierstra,et al.  Higher order attribute grammars , 1989, PLDI '89.

[42]  Cormac Flanagan,et al.  Avoiding exponential explosion: generating compact verification conditions , 2001, POPL '01.

[43]  Jakob Rehof,et al.  Type elaboration and subtype completion for Java bytecode , 2000, TOPL.

[44]  Didier Parigot,et al.  Specification and Implementation of Grammar Couplings using Attribute Grammars , 1993, PLILP.

[45]  Saman P. Amarasinghe,et al.  Exploiting superword level parallelism with multimedia instruction sets , 2000, PLDI '00.

[46]  Suresh Jagannathan,et al.  Single and loving it: must-alias analysis for higher-order languages , 1998, POPL '98.

[47]  Roberto Giacobazzi,et al.  Abductive Analysis of Modular Logic Programs , 1994, J. Log. Comput..

[48]  Jérôme Feret,et al.  Confidentiality Analysis of Mobile Systems , 2000, SAS.

[49]  Michael Hind,et al.  Assessing the Effects of Flow-Sensitivity on Pointer Alias Analyses , 1998, SAS.

[50]  Pierre Jouvelot,et al.  Separate Abstract Interpretation for Control-Flow Analysis , 1994, TACS.

[51]  David Grove,et al.  Selective specialization for object-oriented languages , 1995, PLDI '95.

[52]  David Grove,et al.  Fast interprocedural class analysis , 1998, POPL '98.

[53]  David W. Binkley,et al.  Program slicing , 2008, 2008 Frontiers of Software Maintenance.

[54]  John C. Reynolds,et al.  Definitional Interpreters for Higher-Order Programming Languages , 1972, ACM '72.

[55]  Gregg Rothermel,et al.  Analyzing Regression Test Selection Techniques , 1996, IEEE Trans. Software Eng..

[56]  Barbara G. Ryder,et al.  Points-to and Side-Effect Analyses for Programs Built with Precompiled Libraries , 2001, CC.

[57]  Chris Hankin,et al.  Lazy Type Inference and Program Analysis , 1995, Sci. Comput. Program..

[58]  Gagan Agrawal Demand-Driven Construction of Call Graphs , 2000, CC.

[59]  Laurie J. Hendren,et al.  Decompiling Java using staged encapsulation , 2001, Proceedings Eighth Working Conference on Reverse Engineering.

[60]  G. Ramalingam,et al.  The undecidability of aliasing , 1994, TOPL.

[61]  Damien Massé,et al.  Combining Forward and Backward Analyses of Temporal Properties , 2001, PADO.

[62]  Thomas W. Reps,et al.  Demand interprocedural dataflow analysis , 1995, SIGSOFT FSE.

[63]  Mary Lou Soffa,et al.  Efficient computation of interprocedural definition-use chains , 1994, TOPL.

[64]  W. E. Weihl,et al.  Efficient and flexible value sampling , 2000, SIGP.

[65]  David Callahan,et al.  The program summary graph and flow-sensitive interprocedual data flow analysis , 1988, PLDI '88.

[66]  François Bodin,et al.  Improving cache behavior of dynamically allocated data structures , 1998, Proceedings. 1998 International Conference on Parallel Architectures and Compilation Techniques (Cat. No.98EX192).

[67]  James R. Larus,et al.  Cache-conscious structure layout , 1999, PLDI '99.

[68]  Tim Sheard Using MetaML: A Staged Programming Language , 1998, Advanced Functional Programming.

[69]  Roberto Giacobazzi,et al.  Making abstract interpretations complete , 2000, JACM.

[70]  Nicolas Halbwachs,et al.  Détermination automatique de relations linéaires vérifiées par les variables d'un programme , 1979 .

[71]  Viljem Zumer,et al.  Multiple Attribute Grammar Inheritance , 2000, Informatica.

[72]  Laurie J. Hendren,et al.  Optimizing Java Bytecode Using the Soot Framework: Is It Feasible? , 2000, CC.

[73]  Brenda S. Baker,et al.  An Algorithm for Structuring Flowgraphs , 1977, J. ACM.

[74]  Robert W. Floyd,et al.  Assigning meaning to programs , 1967 .

[75]  Dirk Grunwald,et al.  Reducing indirect function call overhead in C++ programs , 1994, POPL '94.

[76]  Barbara G. Ryder,et al.  Data-Flow-Based Virtual Function Resolution , 1996, SAS.

[77]  Margaret Martonosi,et al.  Wattch: a framework for architectural-level power analysis and optimizations , 2000, Proceedings of 27th International Symposium on Computer Architecture (IEEE Cat. No.RS00201).

[78]  Peter Sestoft,et al.  Partial evaluation and automatic program generation , 1993, Prentice Hall international series in computer science.

[79]  Lyle Ramshaw,et al.  Eliminating go to's while preserving program structure , 1988, JACM.

[80]  Saumya K. Debray,et al.  Automatic Mode Inference for Logic Programs , 1988, J. Log. Program..

[81]  Antoine Miné,et al.  A New Numerical Abstract Domain Based on Difference-Bound Matrices , 2001, PADO.

[82]  Amer Diwan,et al.  Using types to analyze and optimize object-oriented programs , 2001, TOPL.

[83]  Donglin Liang,et al.  Efficient Computation of Parameterized Pointer Information for Interprocedural Analyses , 2001, SAS.

[84]  Laurie J. Hendren,et al.  Taming control flow: a structured approach to eliminating goto statements , 1994, Proceedings of 1994 IEEE International Conference on Computer Languages (ICCL'94).

[85]  Barbara G. Ryder,et al.  Interprocedural Side Effect Analysis With Pointer Aliasing , 1993, PLDI.

[86]  GhiyaRakesh,et al.  Context-sensitive interprocedural points-to analysis in the presence of function pointers , 1994 .