Parameterized object sensitivity for points-to analysis for Java

The goal of points-to analysis for Java is to determine the set of objects pointed to by a reference variable or a reference object field. We present object sensitivity, a new form of context sensitivity for flow-insensitive points-to analysis for Java. The key idea of our approach is to analyze a method separately for each of the object names that represent run-time objects on which this method may be invoked. To ensure flexibility and practicality, we propose a parameterization framework that allows analysis designers to control the tradeoffs between cost and precision in the object-sensitive analysis.Side-effect analysis determines the memory locations that may be modified by the execution of a program statement. Def-use analysis identifies pairs of statements that set the value of a memory location and subsequently use that value. The information computed by such analyses has a wide variety of uses in compilers and software tools. This work proposes new versions of these analyses that are based on object-sensitive points-to analysis.We have implemented two instantiations of our parameterized object-sensitive points-to analysis. On a set of 23 Java programs, our experiments show that these analyses have comparable cost to a context-insensitive points-to analysis for Java which is based on Andersen's analysis for C. Our results also show that object sensitivity significantly improves the precision of side-effect analysis and call graph construction, compared to (1) context-insensitive analysis, and (2) context-sensitive points-to analysis that models context using the invoking call site. These experiments demonstrate that object-sensitive analyses can achieve substantial precision improvement, while at the same time remaining efficient and practical.

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

[2]  David Grove,et al.  A framework for call graph construction algorithms , 2001, TOPL.

[3]  Barbara G. Ryder,et al.  Points-to analysis for Java based on annotated constraints , 2000 .

[4]  Michael Hind,et al.  Which pointer analysis should I use? , 2000, ISSTA '00.

[5]  Andrew A. Chien,et al.  Precise Concrete Type Inference for Object-Oriented Languages , 1994, OOPSLA.

[6]  Gregg Rothermel,et al.  Performing data flow testing on classes , 1994, SIGSOFT '94.

[7]  Barbara G. Ryder,et al.  Points-to analysis for Java using annotated constraints , 2001, OOPSLA '01.

[8]  Ondrej Lhoták,et al.  Scaling Java Points-to Analysis Using SPARK , 2003, CC.

[9]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[10]  Martin C. Rinard,et al.  Compositional pointer and escape analysis for Java programs , 1999, OOPSLA '99.

[11]  Guy L. Steele,et al.  Java(TM) Language Specification, The (3rd Edition) (Java (Addison-Wesley)) , 2005 .

[12]  Thomas W. Reps,et al.  Precise interprocedural dataflow analysis via graph reachability , 1995, POPL '95.

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

[14]  Barbara G. Ryder,et al.  Precise and practical flow analysis of object-oriented software , 2003 .

[15]  Lars Clausen A Java bytecode optimizer using side‐effect analysis , 1997 .

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

[17]  Lori L. Pollock,et al.  The Construction of Contextual Def-Use Associations for Object-Oriented Systems , 2003, IEEE Trans. Software Eng..

[18]  Lars Ræder Clausen A Java Bytecode Optimizer Using Side-Effect Analysis , 1997, Concurr. Pract. Exp..

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

[20]  Bjarne Steensgaard,et al.  Points-to analysis in almost linear time , 1996, POPL '96.

[21]  Susan Horwitz,et al.  The Effects of the Precision of Pointer Analysis , 1997, SAS.

[22]  Jens Palsberg,et al.  Making Type Inference Practical , 1992, ECOOP.

[23]  Ole Agesen Constraint-Based Type Inference and Parametric Polymorphism , 1994, SAS.

[24]  Donglin Liang,et al.  Extending and evaluating flow-insenstitive and context-insensitive points-to analyses for Java , 2001, PASTE '01.

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

[26]  Ole Agesen The Cartesian Product Algorithm: Simple and Precise Type Inference Of Parametric Polymorphism , 1995, ECOOP.

[27]  Jens Palsberg,et al.  Object-oriented type inference , 1991, OOPSLA '91.

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

[29]  Alexander Aiken,et al.  A Toolkit for Constructing Type- and Constraint-Based Program Analyses , 1998, Types in Compilation.

[30]  Frank Tip,et al.  Practical experience with an application extractor for Java , 1999, OOPSLA '99.

[31]  Lars Ole Andersen,et al.  Program Analysis and Specialization for the C Programming Language , 2005 .

[32]  David Grove,et al.  Optimization of Object-Oriented Programs Using Static Class Hierarchy Analysis , 1995, ECOOP.

[33]  Lori L. Pollock,et al.  Inter-class def-use analysis with partial class representations , 1999, PASTE '99.

[34]  G RyderBarbara,et al.  Parameterized object sensitivity for points-to analysis for Java , 2005 .

[35]  Erik Ruf,et al.  Effective synchronization removal for Java , 2000, PLDI '00.

[36]  Barbara G. Ryder,et al.  A schema for interprocedural modification side-effect analysis with pointer aliasing , 2001, TOPL.

[37]  Ondrej Lhoták,et al.  Points-to analysis using BDDs , 2003, PLDI '03.

[38]  Barbara G. Ryder Dimensions of Precision in Reference Analysis of Object-Oriented Programming Languages , 2003, CC.

[39]  Monica S. Lam,et al.  An Efficient Inclusion-Based Points-To Analysis for Strictly-Typed Languages , 2002, SAS.

[40]  Susan Horwitz,et al.  Fast and accurate flow-insensitive points-to analysis , 1997, POPL '97.

[41]  Barbara G. Ryder,et al.  Interprocedural Def-Use Associations for C Systems with Single Level Pointers , 1994, IEEE Trans. Software Eng..

[42]  Barbara G. Ryder,et al.  Parameterized object sensitivity for points-to and side-effect analyses for Java , 2002, ISSTA '02.

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

[44]  Amer Diwan,et al.  Simple and effective analysis of statically-typed object-oriented programs , 1996, OOPSLA '96.

[45]  Lori L. Pollock,et al.  Contextual def-use associations for object aggregation , 2001, PASTE '01.

[46]  Chrislain Razafimahefa A Study Of Side-Effect Analyses For Java , 1999 .

[47]  Guy L. Steele,et al.  The Java Language Specification , 1996 .

[48]  Manuvir Das,et al.  Unification-based pointer analysis with directional assignments , 2000, PLDI '00.

[49]  Chen Fu,et al.  Testing of java web services for robustness , 2004, ISSTA '04.

[50]  Lori L. Pollock,et al.  OMEN: A strategy for testing object-oriented software , 2000, ISSTA '00.

[51]  Erik Ruf,et al.  Marmot: an optimizing compiler for Java , 2000 .

[52]  Erik Ruf,et al.  Marmot: an optimizing compiler for Java , 2000, Softw. Pract. Exp..

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