1. A method for creating a protocol state machine for at least one of a class and an interface of a software, the method comprising: instrumenting the software and processing the instrumented software to generate a call log for the software; using the call log to create a call graph for the at least one of a class and an interface associated with the software, and to identify a plurality of variable values of the class or interface the call graph comprising an identification of call patterns for a plurality of functions of the class or interface; and generating a protocol state machine for the class or interface based on the identified call patterns.