ABSTRACT
We present a points-to analysis technique suitable for environments with small time and memory budgets, such as just-in-time (JIT) compilers and interactive development environments (IDEs). Our technique is demand-driven, performing only the work necessary to answer each query (a request for a variable's points-to information) issued by a client. In cases where even the demand-driven approach exceeds the time budget for a query, we employ early termination, i.e., stopping the analysis prematurely and returning an over-approximated result to the client. Our technique improves on previous demand-driven points-to analysis algorithms [17, 33] by achieving much higher precision under small time budgets and early termination.We formulate Andersen's analysis [5] for Java as a CFL-reachability problem [33]. This formulation shows that Andersen's analysis for Java is a balanced-parentheses problem, an insight that enables our new techniques. We exploit the balanced parentheses structure to approximate Andersen's analysis by regularizing the CFL-reachability problem, yielding an asymptotically cheaper algorithm. We also show how to regain most of the precision lost in the regular approximation as needed through refinement. Our evaluation shows that our regularization and refinement approach achieves nearly the precision of field-sensitive Andersen's analysis in time budgets as small as 2ms per query. Our technique can yield speedups of up to 16x over computing an exhaustive Andersen's analysis for some clients, with little to no precision loss.
- Ashes suite collection. http://www.sable.mcgill.ca/software/.Google Scholar
- jEdit: Open source programmer's text editor. http://www.jedit.org.Google Scholar
- A. Aiken, M. Fändrich, J. S. Foster, and Z. Su. A toolkit for constructing type- and constraint-based program analyses. In Workshop on Types in Compilation, Kyoto, Japan, March 1998. Google ScholarDigital Library
- B. Alpern, D. Attanasio, J. Barton, M. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, T. Ngo, M. Mergen, V. Sarkar, M. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeno virtual machine. IBM Systems Journal, Java Performance Issue, 39(1), 2000. Google ScholarDigital Library
- L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU, 1994.Google Scholar
- D. Bacon and P. Sweeney. Fast static analysis of c++ virtual function calls. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), San Jose, CA, October 1996. Google ScholarDigital Library
- M. Berndl, O. Lhoták, F. Qian, L. Hendren, and N. Umanee. Points-to analysis using BDDs. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), San Diego, CA, June 2003. Google ScholarDigital Library
- C. Chambers and D. Ungar. Making pure object-oriented languages practical. In N. Meyrowitz, editor, Proceedings of the Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA), volume 26, pages 1--15, New York, NY, 1991. ACM Press. Google ScholarDigital Library
- J.-D. Choi, M. Gupta, M. Serrano, V. Sreedhar, and S. Midkiff. Escape analysis for Java. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Denver, Colorado, November 1999. Google ScholarDigital Library
- M. Das. Unification-based pointer analysis with directional assignments. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Vancouver, British Columbia, Canada, June 2000. Google ScholarDigital Library
- J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In European Conference on Object-Oriented Programming (ECOOP), August 1995. Google ScholarDigital Library
- M. Fändrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In Conference on Programming Language Design and Implementation (PLDI), June 1998. Google ScholarDigital Library
- S. Fink, K. Knobe, and V. Sarkar. Unified analysis of array and object reference in strongly typed languages. In Proceedings of the 2000 Static Analysis Symposium, June 2000. Google ScholarDigital Library
- S. Fink and F. Qian. Design, implementation and evaluation of adaptive recompilation with on-stack replacement, 2003. Google ScholarDigital Library
- M. Fowler. Refactoring: improving the design of existing code. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. Google ScholarDigital Library
- S. Z. Guyer and C. Lin. Client-driven pointer analysis. In International Static Analysis Symposium (SAS), San Diego, CA, June 2003. Google ScholarDigital Library
- N. Heintze and O. Tardieu. Demand-driven pointer analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, June 2001. Google ScholarDigital Library
- N. Heintze and O. Tardieu. Ultra-fast aliasing analysis using CLA: A million lines of C code in a second. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, June 2001. Google ScholarDigital Library
- M. Hind. Pointer analysis: Haven't we solved this problem yet? In ACM SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering (PASTE), Snowbird, Utah, June 2001. Google ScholarDigital Library
- M. Hirzel, A. Diwan, and M. Hind. Pointer analysis in the presence of dynamic class loading. In European Conference on Object-Oriented Programming (ECOOP), June 2004.Google ScholarCross Ref
- M. Hirzel, D. von Dincklage, A. Diwan, and M. Hind. Fast online pointer analysis. Technical report, IBM Research RC23638, June 2005.Google Scholar
- S. Horwitz, T. Reps, and M. Sagiv. Demand interprocedural dataflow analysis. In SIGSOFT'95: Proceedings of the Third ACM SIGSOFT Symposium on the Foundations of Software Engineering, 1995. Google ScholarDigital Library
- J. Kodumal and A. Aiken. The set constraint/CFL reachability connection in practice. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), June 2004. Google ScholarDigital Library
- J. Kodumal and A. Aiken. Banshee: A scalable constraint-based analysis toolkit. In SAS '05: Proceedings of the 12th International Static Analysis Symposium. London, United Kingdom, September 2005. Google ScholarDigital Library
- O. Lhoták. Spark: A flexible points-to analysis framework for Java. Master's thesis, McGill University, December 2002.Google Scholar
- O. Lhoták and L. Hendren. Scaling Java points-to analysis using Spark. In International Conference on Compiler Construction (CC), Warsaw, Poland, April 2003. Google ScholarDigital Library
- O. Lhoták and L. Hendren. Jedd: a BDD-based relational extension of Java. In Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, 2004. Google ScholarDigital Library
- D. Liang, M. Pennings, and M. J. Harrold. Extending and evaluating flow-insensitive and context-insensitive points-to analyses for Java. In Workshop on Program Analysis for Software Tools and Engineering (PASTE), Snowbird, Utah, June 2001. Google ScholarDigital Library
- D. Liang, M. Pennings, and M. J. Harrold. Evaluating the precision of static reference analysis using profiling. In Internal Symposium of Software Testing and Analysis (ISSTA), Rome, Italy, July 2002. Google ScholarDigital Library
- A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to and side-effect analyses for Java. In International Symposium on Software Testing and Analysis (ISSTA), Rome, Italy, July 2002. Google ScholarDigital Library
- R. O'Callahan. Generalized Aliasing as a Basis for Program Analysis Tools. PhD thesis, Carnegie Mellon University, November 2000. Google ScholarDigital Library
- T. Reps. Solving demand versions of interprocedural analysis problems. In International Conference on Compiler Construction (CC), Edinburgh, Scotland, April 1994. Google ScholarDigital Library
- T. Reps. Program analysis via graph reachability. Information and Software Technology, 40(11-12):701--726, November/December 1998.Google ScholarCross Ref
- T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM Symposium on Principles of Programming Languages (POPL), San Francisco, CA, pages 49--61, January 1995. Google ScholarDigital Library
- T. Reps, S. Horwitz, M. Sagiv, and G. Rosay. Speeding up slicing. In ACM SIGSOFT Symposium on the Foundations of Software Engineering (FSE), New Orleans, LA, December 1994. Google ScholarDigital Library
- A. Rountev and S. Chandra. Off-line variable substitution for scaling points-to analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Vancouver, British Columbia, Canada, June 2000. Google ScholarDigital Library
- A. Rountev, A. Milanova, and B. G. Ryder. Points-to analysis for Java using annotated constraints. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Tampa Bay, Florida, October 2001. Google ScholarDigital Library
- B. G. Ryder. Dimensions of precision in reference analysis of object-oriented programming languages. In International Conference on Compiler Construction (CC), Warsaw, Poland, April 2003. Google ScholarDigital Library
- Z. Su, M. Fähndrich, and A. Aiken. Projection merging: Reducing redundancies in inclusion constraint graphs. In ACM Symposium on Principles of Programming Languages (POPL), Boston, Massachusetts, pages 81--95, January 2000. Google ScholarDigital Library
- V. Sundaresan, L. J. Hendren, C. Razafimahefa, R. Vallée-Rai, P. Lam, E. Gagnon, and C. Godin. Practical virtual method call resolution for Java. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Minneapolis, MN, October 2000. Google ScholarDigital Library
- F. Tip and J. Palsberg. Scalable propagation-based call graph construction algorithms. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Minneapolis, MN, October 2000. Google ScholarDigital Library
- R. Vallée-Rai, L. Hendren, V. Sundaresan, P. Lam, E. Gagnon, and P. Co. Soot - a Java optimization framework. In Proceedings of CASCON 1999, pages 125--135, 1999.Google ScholarDigital Library
- F. Vivien and M. C. Rinard. Incrementalized pointer and escape analysis. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, June 2001. Google ScholarDigital Library
- J. Whaley and M. Lam. An efficient inclusion-based points-to analysis for strictly-typed languages. In International Static Analysis Symposium (SAS), Madrid, Spain, September 2002. Google ScholarDigital Library
- J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Proceedings of the Conference on Programming Language Design and Implementation. ACM Press, June 2004. Google ScholarDigital Library
- J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), Denver, Colorado, November 1999. Google ScholarDigital Library
- M. Yannakakis. Graph-theoretic methods in database theory. In ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), April 1990. Google ScholarDigital Library
- S. H. Yong, S. Horwitz, and T. W. Reps. Pointer analysis for programs with structures and casting. In SIGPLAN Conference on Programming Language Design and Implementation, pages 91--103, 1999. Google ScholarDigital Library
- J. Zhu and S. Calman. Symbolic pointer analysis revisited. In Proceedings of the ACM SIGPLAN 2004 conference on Programming language design and implementation, 2004. Google ScholarDigital Library
Index Terms
- Demand-driven points-to analysis for Java
Recommendations
Refinement-based context-sensitive points-to analysis for Java
PLDI '06: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and ImplementationWe present a scalable and precise context-sensitive points-to analysis with three key properties: (1) filtering out of unrealizable paths, (2) a context-sensitive heap abstraction, and (3) a context-sensitive call graph. Previous work [21] has shown ...
Demand-driven points-to analysis for Java
Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming systems languages and applicationsWe present a points-to analysis technique suitable for environments with small time and memory budgets, such as just-in-time (JIT) compilers and interactive development environments (IDEs). Our technique is demand-driven, performing only the work ...
Refinement-based context-sensitive points-to analysis for Java
Proceedings of the 2006 PLDI ConferenceWe present a scalable and precise context-sensitive points-to analysis with three key properties: (1) filtering out of unrealizable paths, (2) a context-sensitive heap abstraction, and (3) a context-sensitive call graph. Previous work [21] has shown ...
Comments