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

Compositional pointer and escape analysis for Java programs

Authors Info & Claims
Published:01 October 1999Publication History

ABSTRACT

This paper presents a combined pointer and escape analysis algorithm for Java programs. The algorithm is based on the abstraction of points-to escape graphs, which characterize how local variables and fields in objects refer to other objects. Each points-to escape graph also contains escape information, which characterizes how objects allocated in one region of the program can escape to be accessed by another region. The algorithm is designed to analyze arbitrary regions of complete or incomplete programs, obtaining complete information for objects that do not escape the analyzed regions.

We have developed an implementation that uses the escape information to eliminate synchronization for objects that are accessed by only one thread and to allocate objects on the stack instead of in the heap. Our experimental results are encouraging. We were able to analyze programs tens of thousands of lines long. For our benchmark programs, our algorithms enable the elimination of between 24% and 67% of the synchronization operations. They also enable the stack allocation of between 22% and 95% of the objects.

References

  1. 1.J. Aldrich, C. Chambers, E. Sirer, and S. Eggers. Static analyses for eliminating unnecessary synchronization from java programs. In Proceedings of the 6th International Static Analysis Symposium, September 1999.Google ScholarGoogle ScholarCross RefCross Ref
  2. 2.Lars Ole Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.Google ScholarGoogle Scholar
  3. 3.B. Goldberg and Y. Park. Escape analysis on lists. In Proceedings of the SIGPLAN '92 Conference on Program Language Design and Implementation, pages 116- 127, July 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.H. Baker. Unifying and conquer (garbage, updating, aliasing ..) in functional languages. In Proceedings of the ACM Conference on Lisp and Functional Programming, pages 218-226, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.B. Blanchet. Escape analysis: Correctness proof, implementation and experimental results. In Proceedings of the 25th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1998. ACM, ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.B. Blanchet. Escape analysis for object oriented languages, application to java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.J. Bodga and U. Hoelzle. Removing unnecessary synchronization in java. In Proceedings of the 14th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.M. Burke, J. Choi, S. Fink, D. Grove, M. Hind, V. Sarkar, M. Serrano, V. Sreedhar, H. Srinivasan, and 3. Whaley. The jalapefio dynamic optimizing compiler for java. In Proceedings of the A CM SIGPLAN 1999 Java Grande Conference, June 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.R. Chatterjee, B. Ryder, and W. Landi. Relevant context inference. In Proceedings of the 26th Annual A CM Symposium on the Principles of Programming Languages, San Antonio, TX, January 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 10.J. Choi, M. Burke, and P. Carini. Efficient flow-sensitive interprocedural computation of pointerinduced aliases and side effects. In Conference Record of the Twentieth Annual Symposium on Principles of Programming Languages, Charleston, SC, January 1993. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 11.J. Choi, M. Gupta, M. Serrano, V. Sreedhar, and S. Midkiff. Escape analysis for java. In Proceedings of the l~th Annual Conference on Object-Oriented Programming Systems, Languages and Applications, Denver, CO, November 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 12.J. Corbett. Using shape analysis to reduce finite-state models of concurrent java programs. In Proceedings of the International Symposium on Software Testing and Analysis, March 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.J. Dean, D. Grove, and C. Chambers. Optimization of object-oriented programs using static class hierarchy analysis. In Proceedings of the gth European Conference on Object-Oriented Programming, Aarhus, Denmark, August 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 14.A. Deutsch. On determining lifetime and aliasing of dynamically allocated data in higher-order functional specifications. In Proceedings of the 17th Annual A CM Symposium on the Principles of Programming Languages, pages 157-168, San Francisco, CA, January 1990. ACM, ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 15.A. Deutsch. On the complexity of escape analysis, in Proceedings of the 24th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1997. ACM, ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 16.P. Diniz and M. Rinard. Lock coarsening: Eliminating lock overhead in automatically parallelized objectbased programs. In Proceedings of the Ninth Workshop on Languages and Compilers for Parallel Computing, pages 285-299, San Jose, CA, August 1996. Springer- Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. 17.P. Diniz and M. Rinard. Synchronization transformations for parallel computing. In Proceedings of the 2~th Annual A CM Symposium on the Principles of Programming Languages, pages 187-200, Paris, France, January 1997. ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 18.M. Emami, R. Ghiya, and L. Hendren. Contextsensitive interprocedural points-to analysis in the presence of function pointers. In Proceedings of the SIG- PLAN '94 Conference on Program Language Design and Implementation, pages 242-256, Orlando, FL, June 1994. ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 19.J. Hannan. A type-based analysis for block allocation in functional languages. In Proceedings of the Second International Static Analysis Symposium. ACM, ACM, New York, September 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 20.W. Landi and B. Ryder. A safe approximation algorithm for interprocedural pointer aliasing. In Proceedings of the SIGPLAN '92 Conference on Program Language Design and Implementation, San Francisco, CA, June 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 21.J. Plevyak, X. Zhang, and A. Chien. Obtaining sequential efficiency for concurrent object-oriented languages. In Proceedings of the 2Pad Annual A CM Symposium on the Principles of Programming Languages, San Francisco, CA, January 1995. ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. 22.E. Ruf. Context-insensitive alias analysis reconsidered. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, La Jolla, CA, June 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 23.R. Rugina and M. Rinard. Pointer analysis for multithreaded programs. In Proceedings of the SIGPLAN '99 Conference on Program Language Design and Implementation, Atlanta, GA, May 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. 24.M. Sagiv, T. Raps, and R. Wilhelm. Solving shapeanalysis problems in languages with destructive updating. A CM Transactions on Programming Languages and Systems, 20(1):1-50, January 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 25.P. Sathyanathan and M. Lain. Context-sensitive interprocedural pointer analysis in the presence of dynamic aliasing. In Proceedings of the Ninth Workshop on Languages and Compilers for Parallel Computing, San Jose, CA, August 1996. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 26.M. Shapiro and S. Horwitz. Fast and accurate flowinsensitive points-to analysis. In Proceedings of the 24th Annual A CM Symposium on the Principles of Programming Languages, Paris, France, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. 27.Bjarne Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd Annual A CM Symposium on the Principles of Programming Languages, St. Petersburg Beach, FL, January 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 28.R. Wilson attd M. Lain. Efficient context-sensitive pointer analysis for C programs. In Proceedings of the SIGPLAN '95 Conference on Program Language Design and Implementation, La Jolla, CA, June 1995. ACM, New York. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 29.Y. Tang and P. Jouvelot. Control-flow effects for escape analysis. In Workshop on Static Analysis, pages 313- 321, September 1992.Google ScholarGoogle Scholar

Index Terms

  1. Compositional pointer and escape analysis for Java programs

                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 '99: Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
                  October 1999
                  462 pages
                  ISBN:1581132387
                  DOI:10.1145/320384

                  Copyright © 1999 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: 1 October 1999

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • Article

                  Acceptance Rates

                  OOPSLA '99 Paper Acceptance Rate30of152submissions,20%Overall Acceptance Rate268of1,244submissions,22%

                  Upcoming Conference

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader