Using Dynamic Call Graphs For Creating State Machines
AssigneeInternational Business Machines Corporation
InventorSandeep Kohli
Life of this patent
Estimating the term…
Abstract
A method and system capable of creating UML protocol state machine for classes and interfaces of a software, by instrumenting the software to obtain a call graph comprising classes and interfaces and respective values associated with class variables and interface variables; identifying particular classes and interfaces in the call graph; identifying call patterns from the call graph to generate a protocol state machine.
Claims9
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.
A system comprising:
- a processor;
- a computer readable medium coupled to the processor;
- and
- computer code encoded in the computer readable medium and executable by the processor to cause the processor to:
- instrument a software program and process the instrumented software program to generate a call log for the software program;
- use the call lo to create a call graph for at least one of a class and an interface associated with the software program, 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
- generate a protocol state machine for the class or interface based on the identified call patterns.
A computer program product comprising a computer readable medium having a computer readable program comprising software, wherein the computer readable program when executed on a computer causes the computer to:
- instrument a software program and process the instrumented software program to generate a call log for the software program;
- use the call lo to create a call graph for at least one of a class and an interface associated with the software program, 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;
- generate a protocol state machine for the class or interface based on the identified call patterns;
- use the sequence of execution of all threads associated in the software to generate the protocol state machine, and on determination that the threads do not follow a redefined sequence create a new protocol state machine reflecting out of order sequences as optional elements;
- and
- infer pro and post conditions associated with at least one class attribute, based on class attributes before and after at least one function call to refine the protocol state machine.
Dependencies are inferred from the claim text.