Dynamically inferring, refining, and checking API usage protocols

  • Authors:
  • Michael Pradel

  • Affiliations:
  • Swiss Federal Institute of Technology (ETH), Zurich, Switzerland

  • Venue:
  • Proceedings of the 24th ACM SIGPLAN conference companion on Object oriented programming systems languages and applications
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Using a set of API methods often requires compliance with a protocol, whose violation can lead to errors in the program. However, most APIs lack explicit and formal definitions of these protocols. We propose a dynamic program analysis for automatically inferring and refining specifications of correct method call sequences. Our experiments with several Java programs show that we can infer meaningful protocols, such as widely respected programming rules. Furthermore, our analysis finds violations of the inferred specifications that point out potential bugs to the programmer.