Date Added: Oct 2009
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. The authors propose a dynamic program analysis for automatically inferring and refining specifications of correct method call sequences. Their experiments with several Java programs show that they can infer meaningful protocols, such as widely respected programming rules. Furthermore, their analysis finds violations of the inferred specifications that point out potential bugs to the programmer.