Compositional may-must program analysis: unleashing the power of alternation

  • Authors:
  • Patrice Godefroid;Aditya V. Nori;Sriram K. Rajamani;Sai Deep Tetali

  • Affiliations:
  • Microsoft Research, Redmond, USA;Microsoft Research, Bangalore, India;Microsoft Research, Bangalore, India;University of California, Los Angeles, Los Angeles, USA

  • Venue:
  • Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
  • Year:
  • 2010

Quantified Score

Hi-index 0.02

Visualization

Abstract

Program analysis tools typically compute two types of information: (1) may information that is true of all program executions and is used to prove the absence of bugs in the program, and (2) must information that is true of some program executions and is used to prove the existence of bugs in the program. In this paper, we propose a new algorithm, dubbed SMASH, which computes both may and must information compositionally . At each procedure boundary, may and must information is represented and stored as may and must summaries, respectively. Those summaries are computed in a demand driven manner and possibly using summaries of the opposite type. We have implemented SMASH using predicate abstraction (as in SLAM) for the may part and using dynamic test generation (as in DART) for the must part. Results of experiments with 69 Microsoft Windows 7 device drivers show that SMASH can significantly outperform may-only, must-only and non-compositional may-must algorithms. Indeed, our empirical results indicate that most complex code fragments in large programs are actually often either easy to prove irrelevant to the specific property of interest using may analysis or easy to traverse using directed testing. The fine-grained coupling and alternation of may (universal) and must (existential) summaries allows SMASH to easily navigate through these code fragments while traditional may-only, must-only or non-compositional may-must algorithms are stuck in their specific analyses.