skip to main content
research-article
Open Access

Selective X-Sensitive Analysis Guided by Impact Pre-Analysis

Published:22 December 2015Publication 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 and a selective flow-sensitive analysis. Our experiments show that the method cost-effectively improves the precision in the these analyses as well.

References

  1. Patrick Cousot and Radhia Cousot. 1977. Abstract interpretation: A unified lattice model for static analysis of programs by construction or approximation of fixpoints. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 238--252. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Patrick Cousot and Radhia Cousot. 1992. Abstract interpretation frameworks. Journal of Logic and Computation 2, 4, 511--547.Google ScholarGoogle ScholarCross RefCross Ref
  3. Alain Deutsch. 1997. On the complexity of escape analysis. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL’97). ACM, New York, NY, 358--371. DOI:http://dx.doi.org/10.1145/263699.263750 Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Azadeh Farzan and Zachary Kincaid. 2012. Verification of parameterized concurrent programs by modular reasoning about data and control. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 297--308. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Samuel Z. Guyer and Calvin Lin. 2003. Client-driven pointer analysis. In Proceedings of the International Symposium on Static Analysis. 214--236. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Williams L. Harrison III. 1989. The interprocedural analysis and automatic parallelization of scheme programs. LISP and Symbolic Computation 2, 3, 179--396.Google ScholarGoogle ScholarCross RefCross Ref
  7. Nevin Heintze and Olivier Tardieu. 2001. Demand-driven pointer analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 24--34. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Yungbum Jung, Jaehwang Kim, Jaeho Shin, and Kwangkeun Yi. 2005. Taming false alarms from a domain-unaware C analyzer by a Bayesian statistical post analysis. In Proceedings of the International Symposium on Static Analysis. 203--217. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. George Kastrinis and Yannis Smaragdakis. 2013. Hybrid context-sensitivity for points-to analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 423--434. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Woosuk Lee, Wonchan Lee, and Kwangkeun Yi. 2012. Sound non-statistical clustering of static analysis alarms. In Verification, Model Checking, and Abstract Interpretation. Lecture Notes in Computer Science, Vol. 7148. Springer, 299--314. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Percy Liang, Omer Tripp, and Mayur Naik. 2011. Learning minimal abstractions. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 31--42. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Ana Milanova, Atanas Rountev, and Barbara G. Ryder. 2002. Parameterized object sensitivity for points-to and side-effect analyses for Java. In Proceedings of the 2002 ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA’02). 1--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. A. Miné. 2006. The octagon abstract domain. Higher-Order and Symbolic Computation 19, 1, 31--100. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Mayur Naik, Hongseok Yang, Ghila Castelnuovo, and Mooly Sagiv. 2012. Abstractions from tests. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 373--386. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Hakjoo Oh, Wonchan Lee, Kihong Heo, Hongseok Yang, and Kwangkeun Yi. 2014. Selective context-sensitivity guided by impact pre-analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 475--484. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Hakjoo Oh, Kihong Heo, Wonchan Lee, Woosuk Lee, and Kwangkeun Yi. 2012. Design and implementation of sparse global analyses for C-like languages. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 229--238. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Hakjoo Oh, Kihong Heo, Wonchan Lee, Woosuk Lee, and Kwangkeun Yi. 2015. Sparrow. Retrieved November 30, 2015, from http://ropas.snu.ac.kr/sparrow.Google ScholarGoogle Scholar
  18. Hakjoo Oh and Kwangkeun Yi. 2010. An algorithmic mitigation of large spurious interprocedural cycles in static analysis. Software: Practice and Experience 40, 8, 585--603. DOI:http://dx.doi.org/10.1002/spe.969 Google ScholarGoogle ScholarCross RefCross Ref
  19. Hakjoo Oh and Kwangkeun Yi. 2013. Access-based abstract memory localization in static analysis. Science of Computer Programming 78, 9, 1701--1727.Google ScholarGoogle ScholarCross RefCross Ref
  20. Rohan Padhye and Uday P. Khedker. 2013. Interprocedural data flow analysis in soot using value contexts. In Proceedings of the 2nd ACM SIGPLAN International Workshop on State of the Art in Java Program Analysis (SOAP’13). ACM, New York, NY, 31--36. DOI:http://dx.doi.org/10.1145/2487568.2487569 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. John Plevyak and Andrew A. Chien. 1994. Precise concrete type inference for object-oriented languages. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. 324--340. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Thomas Reps, Susan Horwitz, and Mooly Sagiv. 1995. Precise interprocedural dataflow analysis via graph reachability. In Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 49--61. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Xavier Rival and Laurent Mauborgne. 2007. The trace partitioning abstract domain. ACM Transactions on Programming Languages and Systems 29, 5, 26--51. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Micha Sharir and Amir Pnueli. 1981. Two approaches to interprocedural data flow analysis. In Program Flow Analysis: Theory and Applications. Prentice-Hall, Englewood Cliffs, NJ, 189--234.Google ScholarGoogle Scholar
  25. Olin Grigsby Shivers. 1991. Control-Flow Analysis of Higher-Order Languages—or—Taming Lambda. Ph.D. Dissertation. Carnegie Mellon University, Pittsburgh, PA.Google ScholarGoogle Scholar
  26. Yannis Smaragdakis, Martin Bravenboer, and Ondrej Lhoták. 2011. Pick your contexts well: Understanding object-sensitivity. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. 17--30. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Manu Sridharan and Rastislav Bodík. 2006. Refinement-based context-sensitive points-to analysis for Java. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 387--400. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Manu Sridharan, Denis Gopan, Lexin Shan, and Rastislav Bodík. 2005. Demand-driven points-to analysis for Java. In Proceedings of the ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications. 59--76. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Xin Zhang, Ravi Mangal, Radu Grigore, Mayur Naik, and Hongseok Yang. 2014. On abstraction refinement for program analyses in datalog. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 239--248. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Xin Zhang, Mayur Naik, and Hongseok Yang. 2013. Finding optimum abstractions in parametric dataflow analysis. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. 365--376. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Selective X-Sensitive Analysis 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 Transactions on Programming Languages and Systems
      ACM Transactions on Programming Languages and Systems  Volume 38, Issue 2
      January 2016
      212 pages
      ISSN:0164-0925
      EISSN:1558-4593
      DOI:10.1145/2866613
      Issue’s Table of Contents

      Copyright © 2015 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: 22 December 2015
      • Revised: 1 May 2015
      • Accepted: 1 February 2015
      • Received: 1 December 2014
      Published in toplas Volume 38, Issue 2

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader