skip to main content
research-article

Introspective analysis: context-sensitivity, across the board

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

Context-sensitivity is the primary approach for adding more precision to a points-to analysis, while hopefully also maintaining scalability. An oft-reported problem with context-sensitive analyses, however, is that they are bi-modal: either the analysis is precise enough that it manipulates only manageable sets of data, and thus scales impressively well, or the analysis gets quickly derailed at the first sign of imprecision and becomes orders-of-magnitude more expensive than would be expected given the program's size. There is currently no approach that makes precise context-sensitive analyses (of any flavor: call-site-, object-, or type-sensitive) scale across the board at a level comparable to that of a context-insensitive analysis. To address this issue, we propose introspective analysis: a technique for uniformly scaling context-sensitive analysis by eliminating its performance-detrimental behavior, at a small precision expense. Introspective analysis consists of a common adaptivity pattern: first perform a context-insensitive analysis, then use the results to selectively refine (i.e., analyze context-sensitively) program elements that will not cause explosion in the running time or space. The technical challenge is to appropriately identify such program elements. We show that a simple but principled approach can be remarkably effective, achieving scalability (often with dramatic speedup) for benchmarks previously completely out-of-reach for deep context-sensitive analyses.

References

  1. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, DIKU, University of Copenhagen, May 1994.Google ScholarGoogle Scholar
  2. M. Bravenboer and Y. Smaragdakis. Strictly declarative specification of sophisticated points-to analyses. In Conf. on Object Oriented Programming, Systems, Languages, and Applications (OOPSLA), New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. S. Chong. Personal communication, 2013.Google ScholarGoogle Scholar
  4. C. Cifuentes. Personal communication, 2013.Google ScholarGoogle Scholar
  5. M. Eichberg, S. Kloppenburg, K. Klose, and M. Mezini. Defining and continuous checking of structural program dependencies. In Int. Conf. on Software engineering (ICSE), pages 391--400, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. J. Fink. T. J. Watson libraries for analysis (WALA). http://wala.sourceforge.net.Google ScholarGoogle Scholar
  7. S. Guarnieri and B. Livshits. GateKeeper: mostly static enforcement of security and reliability policies for Javascript code. In Proceedings of the 18th USENIX Security Symposium, SSYM'09, pages 151--168, Berkeley, CA, USA, 2009. USENIX Association. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. Z. Guyer and C. Lin. Client-driven pointer analysis. In Proceedings of the 10th International Conference on Static Analysis, SAS'03, pages 214--236, Berlin, Heidelberg, 2003. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. E. Hajiyev, M. Verbaere, and O. de Moor. Codequest: Scalable source code queries with Datalog. In European Conf. on Object-Oriented Programming (ECOOP), pages 2--27. Spinger, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N. Heintze and O. Tardieu. Demand-driven pointer analysis. In Conf. on Programming Language Design and Implementation (PLDI), pages 24--34, New York, NY, USA, 2001. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. G. Kastrinis and Y. Smaragdakis. Efficient and effective handling of exceptions in Java points-to analysis. In Compiler Construction, Mar. 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Kastrinis and Y. Smaragdakis. Hybrid context-sensitivity for points-to analysis. In Conf. on Programming Language Design and Implementation (PLDI). ACM, June 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. S. Lam, J. Whaley, V. B. Livshits, M. C. Martin, D. Avots, M. Carbin, and C. Unkel. Context-sensitive program analysis as database queries. In Symposium on Principles of Database Systems (PODS), pages 1--12, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. O. Lhoták and L. Hendren. Evaluating the benefits of context-sensitive points-to analysis using a BDD-based implementation. ACM Trans. Softw. Eng. Methodol., 18(1):1--53, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. O. Lhoták and L. J. Hendren. Context-sensitive points-to analysis: Is it worth it? In A. Mycroft and A. Zeller, editors, CC, volume 3923 of Lecture Notes in Computer Science, pages 47--64. Springer, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. P. Liang and M. Naik. Scaling abstraction refinement via pruning. In Conf. on Programming Language Design and Implementation (PLDI), pages 590--601, New York, NY, USA, 2011. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Madsen, B. Livshits, and M. Fanning. Practical static analysis of Javascript applications in the presence of frameworks and libraries. Technical Report MSR-TR-2012-66, Microsoft Research, July 2012.Google ScholarGoogle Scholar
  18. M. Might, Y. Smaragdakis, and D. Van Horn. Resolving and exploiting the k-CFA paradox: Illuminating functional vs. object-oriented program analysis. In Conf. on Programming Language Design and Implementation (PLDI), pages 305--315. ACM, June 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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), pages 1--11, New York, NY, USA, 2002. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. 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
  21. T. Reps. Demand interprocedural program analysis using logic databases. In R. Ramakrishnan, editor, Applications of Logic Databases, pages 163--196. Kluwer Academic Publishers, 1994.Google ScholarGoogle Scholar
  22. M. Sharir and A. Pnueli. Two approaches to interprocedural data flow analysis. In S. S. Muchnick and N. D. Jones, editors, Program Flow Analysis, pages 189--233, Englewood Cliffs, NJ, 1981. Prentice-Hall, Inc.Google ScholarGoogle Scholar
  23. O. Shivers. Control-Flow Analysis of Higher-Order Languages. PhD thesis, Carnegie Mellon University, May 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Y. Smaragdakis, M. Bravenboer, and O. Lhoták. Pick your contexts well: Understanding object-sensitivity (the making of a precise and scalable pointer analysis). In Symposium on Principles of Programming Languages (POPL), pages 17--30. ACM Press, Jan. 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. M. Sridharan and R. Bodík. Refinement-based context-sensitive points-to analysis for Java. In Conf. on Programming Language Design and Implementation (PLDI), pages 387--400, New York, NY, USA, 2006. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Sridharan, D. Gopan, L. Shan, and R. Bodík. Demand-driven points-to analysis for Java. In Conf. on Object Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 59--76, New York, NY, USA, 2005. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. O. Tripp, M. Pistoia, S. J. Fink, M. Sridharan, and O. Weisman. Taj: effective taint analysis of web applications. In Conf. on Programming Language Design and Implementation (PLDI), pages 87--97, New York, NY, USA, 2009. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. R. Vallée-Rai, E. Gagnon, L. J. Hendren, P. Lam, P. Pominville, and V. Sundaresan. Optimizing Java bytecode using the Soot framework: Is it feasible? In Int. Conf. on Compiler Construction (CC), pages 18--34, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. 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
  30. J. Whaley, D. Avots, M. Carbin, and M. S. Lam. Using Datalog with binary decision diagrams for program analysis. In K. Yi, editor, APLAS, volume 3780 of Lecture Notes in Computer Science, pages 97--118. Springer, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. J. Whaley and M. S. Lam. Cloning-based context-sensitive pointer alias analysis using binary decision diagrams. In Conf. on Programming Language Design and Implementation (PLDI), pages 131--144, New York, NY, USA, 2004. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. X. Zheng and R. Rugina. Demand-driven alias analysis for c. In Symposium on Principles of Programming Languages (POPL), pages 197--208, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Introspective analysis: context-sensitivity, across the board

        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

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 49, Issue 6
          PLDI '14
          June 2014
          598 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/2666356
          • Editor:
          • Andy Gill
          Issue’s Table of Contents
          • cover image ACM Conferences
            PLDI '14: Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation
            June 2014
            619 pages
            ISBN:9781450327848
            DOI:10.1145/2594291

          Copyright © 2014 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 9 June 2014

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!