skip to main content
research-article

Selective context-sensitivity guided by impact pre-analysis

Published:09 June 2014Publication History
Skip Abstract Section

Abstract

We present a method for selectively applying context-sensitivity during interprocedural program analysis. Our method applies context-sensitivity only when and where doing so is likely to improve the precision that matters for resolving given queries. The idea is to use a pre-analysis to estimate the impact of context-sensitivity on the main analysis's precision, and to use this information to find out when and where the main analysis should turn on or off its context-sensitivity. We formalize this approach and prove that the analysis always benefits from the pre-analysis-guided context-sensitivity. We implemented this selective method for an existing industrial-strength interval analyzer for full C. The method reduced the number of (false) alarms by 24.4%, while increasing the analysis cost by 27.8% on average.

The use of the selective method is not limited to context-sensitivity. We demonstrate this generality by following the same principle and developing a selective relational analysis.

References

  1. Patrick Cousot and Radhia Cousot. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In POPL, 1977. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Alain Deutsch. On the complexity of escape analysis. In POPL, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Azadeh Farzan and Zachary Kincaid. Verification of parameterized concurrent programs by modular reasoning about data and control. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Samuel Z. Guyer and Calvin Lin. Client-driven pointer analysis. In SAS, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Williams L. Harrison III. The interprocedural analysis and automatic parallelization of scheme programs. Lisp and Symbolic Computation, 1989.Google ScholarGoogle Scholar
  6. Nevin Heintze and Olivier Tardieu. Demand-driven pointer analysis. In PLDI, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. George Kastrinis and Yannis Smaragdakis. Hybrid context-sensitivity for points-to analysis. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Percy Liang, Omer Tripp, and Mayur Naik. Learning minimal abstractions. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Ana Milanova, Atanas Rountev, and Barbara G. Ryder. Parameterized object sensitivity for points-to and side-effect analyses for Java. In ISSTA, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Antoine Miné. The octagon abstract domain. Higher-Order and Symbolic Computation, 19(1):31--100, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Mayur Naik, Hongseok Yang, Ghila Castelnuovo, and Mooly Sagiv. Abstractions from tests. In POPL, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Hakjoo Oh, Kihong Heo, Wonchan Lee, Woosuk Lee, and Kwangkeun Yi. Design and implementation of sparse global analyses for C-like languages. In PLDI, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. John Plevyak and Andrew A. Chien. Precise concrete type inference for object-oriented languages. In OOPSLA, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Thomas Reps, Susan Horwitz, and Mooly Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Micha Sharir and Amir Pnueli. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications, pages 189--234. Prentice-Hall, Englewood Cliffs, NJ, 1981.Google ScholarGoogle Scholar
  16. Olin Grigsby Shivers. Control-flow analysis of higher-order languages -or- taming lambda. PhD thesis, CMU, 1991.Google ScholarGoogle Scholar
  17. Yannis Smaragdakis, Martin Bravenboer, and Ondrej Lhoták. Pick your contexts well: understanding object-sensitivity. In POPL, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Sparrow. http://ropas.snu.ac.kr/sparrow.Google ScholarGoogle Scholar
  19. Manu Sridharan and Rastislav Bodík. Refinement-based context-sensitive points-to analysis for Java. In PLDI, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. Demand-driven points-to analysis for Java. In OOPSLA, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Xin Zhang, Mayur Naik, and Hongseok Yang. Finding optimum abstractions in parametric dataflow analysis. In PLDI, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Selective context-sensitivity guided by impact pre-analysis

      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!