Protocol Inference Using Static Path Profiles

  • Authors:
  • Murali Krishna Ramanathan;Koushik Sen;Ananth Grama;Suresh Jagannathan

  • Affiliations:
  • Department of Computer Science, Purdue University,;Electrical Engineering and Computer Science, University of California, Berkeley,;Department of Computer Science, Purdue University,;Department of Computer Science, Purdue University,

  • Venue:
  • SAS '08 Proceedings of the 15th international symposium on Static Analysis
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Specification inference tools typically mine commonalities among states at relevant program points. For example, to infer the invariants that must hold at all calls to a procedure prequires examining the state abstractions found at all call-sites to p. Unfortunately, existing approaches to building these abstractions require being able to explore all paths (either static or dynamic) to all of p's call-sites to derive specifications with any measure of confidence. Because programs that have complex control-flow structure may induce a large number of paths, naive path exploration is impractical.In this paper, we propose a new specification inference technique that allows us to efficiently explore statically all paths to a program point. Our approach builds static path profiles, profile information constructed by a static analysis that accumulates predicates valid along different paths to a program point. To make our technique tractable, we employ a summarization scheme to merge predicates at join points based on the frequency with which they occur on different paths. For example, predicates present on a majorityof static paths to allcall-sites of any procedure pforms the pre-condition of p.We have implemented a tool, marga, based on static path profiling. Qualitative analysis of the specifications inferred by margaindicates that it is more accurate than existing static mining techniques, can be used to derive useful specification even for APIs that occur infrequently (statically) in the program, and is robust against imprecision that may arise from examination of infeasible or infrequently occurring dynamic paths. A comparison of the specifications generated using margawith a dynamic specification inference engine based on cute, an automatic unit test generation tool, indicates that margagenerates comparably precise specifications with smaller cost.