skip to main content
10.1145/1133981.1134027acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article

Refinement-based context-sensitive points-to analysis for Java

Published:11 June 2006Publication History

ABSTRACT

We 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 that all three properties are important for precisely analyzing large programs, e.g., to show safety of downcasts. Existing analyses typically give up one or more of the properties for scalability. We have developed a refinement-based analysis that succeeds by simultaneously refining handling of method calls and heap accesses, allowing the analysis to precisely analyze important code while entirely skipping irrelevant code. The analysis is demanddriven and client-driven, facilitating refinement specific to each queried variable and increasing scalability. In our experimental evaluation, our analysis proved the safety of 61% more casts than one of the most precise existing analyses across a suite of large benchmarks. The analysis checked the casts in under 13 minutes per benchmark (taking less than 1 second per query) and required only 35MB of memory, far less than previous approaches.

References

  1. Ashes suite collection. http://www.sable.mcgill.ca/software/.]]Google ScholarGoogle Scholar
  2. DaCapo Benchmark Suite. http://wwwali. cs.umass.edu/DaCapo/gcbm.html.]]Google ScholarGoogle Scholar
  3. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU, 1994.]]Google ScholarGoogle Scholar
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. M. Berndl, O. Lhoták, F. Qian, L. Hendren, and N. Umanee. Pointsto analysis using BDDs. In Conference on Programming Language Design and Implementation (PLDI), June 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. Cherem and R. Rugina. Region analysis and transformation for java programs. In ISMM '04: Proceedings of the 4th international symposium on Memory management, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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), November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Donovan, A. Kiezun, M. S. Tschantz, and M. D. Ernst. Converting Java programs to use generic libraries. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. M. Fähndrich, J. Rehof, and M. Das. Scalable context-sensitive flow analysis using instantiation constraints. In Conference on Programming Language Design and Implementation (PLDI), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. Fuhrer, F. Tip, J. Dolby, A. Kiezun, and M. Keller. Refactoring techniques for migrating applications to generic java container classes. In European Conference on Object-Oriented Programming (ECOOP), 2005.]]Google ScholarGoogle Scholar
  11. D. Grove and C. Chambers. A framework for call graph construction algorithms. ACM Trans. Program. Lang. Syst., 23(6):685--746, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. S. Z. Guyer and C. Lin. Client-driven pointer analysis. In International Static Analysis Symposium (SAS), San Diego, CA, June 2003.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. Hallem, B. Chelf, Y. Xie, and D. Engler. A system and language for building system-specific, static analyses. In Conference on Programming Language Design and Implementation (PLDI), 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. N. Heintze and O. Tardieu. Demand-driven pointer analysis. In Conference on Programming Language Design and Implementation (PLDI), Snowbird, Utah, June 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. C. Lattner and V. Adve. Data Structure Analysis: An Efficient Context- Sensitive Heap Analysis. Tech. Report UIUCDCS-R-2003-2340, UIUC, April 2003.]]Google ScholarGoogle Scholar
  18. O. Lhoták. Personal communication. 2005.]]Google ScholarGoogle Scholar
  19. O. Lhoták. Program Analysis using Binary Decision Diagrams. PhD thesis, McGill University, Jan. 2006.]]Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. O. Lhoták and L. Hendren. Context-sensitive points-to analysis: Is it worth it? In International Conference on Compiler Construction (CC), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. D. Liang and M. J. Harrold. Efficient computation of parameterizedpointer information for interprocedural analyses. In Proceedings of the 8th International Symposium on Static Analysis, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. A. Milanova, A. Rountev, and B. G. Ryder. Parameterized object sensitivity for points-to analysis for java. ACM Trans. Softw. Eng. Methodol., 14(1):1--41, 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. M. Naik, A. Aiken, and J. Whaley. Effective static race detection for Java. In Conference on Programming Language Design and Implementation (PLDI), 2006.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for java. In CC, pages 138--152, 2003.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. R. O'Callahan. Generalized Aliasing as a Basis for Program Analysis Tools. PhD thesis, Carnegie Mellon University, November 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. Rehof and M. Fähndrich. Type-base flow analysis: from polymorphic subtyping to CFL-reachability. In ACM Symposium on Principles of Programming Languages (POPL), 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. T. Reps. Solving demand versions of interprocedural analysis problems. In International Conference on Compiler Construction (CC), Edinburgh, Scotland, April 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. T. Reps. Program analysis via graph reachability. Information and Software Technology, 40(11-12):701--726, November/December 1998.]]Google ScholarGoogle ScholarCross RefCross Ref
  30. T. Reps. Undecidability of context-sensitive data-independence analysis. ACM Trans. Program. Lang. Syst., 22(1):162--186, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In ACM Symposium on Principles of Programming Languages (POPL), 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  33. E. Ruf. Effective synchronization removal for java. In Conference on Programming Language Design and Implementation (PLDI), 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. B. G. Ryder. Dimensions of precision in reference analysis of objectoriented programming languages. In International Conference on Compiler Construction (CC), Warsaw, Poland, April 2003.]]Google ScholarGoogle ScholarCross RefCross Ref
  35. O. Shivers. Control flow analysis in scheme. In Conference on Programming Language Design and Implementation (PLDI), 1988.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Sridharan and R. Bodík. Refinement-based context-sensitive points-to analysis for Java. Technical Report UCB/EECS-2006-31, UC Berkeley, 2006.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. M. Sridharan, D. Gopan, L. Shan, and R. Bodík. Demand-driven points-to analysis for Java. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. B. Steensgaard. Personal communication on analysis for Microsoft Bartok compiler. 2005.]]Google ScholarGoogle Scholar
  39. B. Steensgaard. Points-to analysis in almost linear time. In ACM Symposium on Principles of Programming Languages (POPL), 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. F. Tip, A. Kiezun, and D. Bäumer. Refactoring for generalization using type constraints. In OOPSLA, pages 13--26, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. T. Wang and S. F. Smith. Precise constraint-based type inference for java. In 15th European Conference on Object-Oriented Programming (ECOOP), 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Conference on Programming Language Design and Implementation (PLDI), 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. J. Whaley and M. Rinard. Compositional pointer and escape analysis for Java programs. In Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), November 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. R. P. Wilson and M. S. Lam. Efficient context-sensitive pointer analysis for C programs. In Conference on Programming Language Design and Implementation (PLDI), 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. J. Zhu and S. Calman. Symbolic pointer analysis revisited. In Conference on Programming Language Design and Implementation (PLDI), 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

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
    PLDI '06: Proceedings of the 27th ACM SIGPLAN Conference on Programming Language Design and Implementation
    June 2006
    438 pages
    ISBN:1595933204
    DOI:10.1145/1133981
    • cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 41, Issue 6
      Proceedings of the 2006 PLDI Conference
      June 2006
      426 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1133255
      Issue’s Table of Contents

    Copyright © 2006 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: 11 June 2006

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • Article

    Acceptance Rates

    Overall Acceptance Rate406of2,067submissions,20%

    Upcoming Conference

    PLDI '24

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader