Databases Reference
In-Depth Information
Instrumented
Program
Instr u men-
tation
Met h od
Traces
Run
Collab o ration
Finder
Collab o ration
Transformers
Obje ct Col-
laborations
Program
Finite State
Machine
Generator
API Usage
Patterns
Collaboration
Patterns
Pattern
Extractor
FIGURE 4.2: Overview of the protocol mining approach.
4.2.1 Collecting Method Traces
The first step of our analysis is to modify programs so that they emit
runtime information during their execution. Since we are interested in spec-
ifications of method call sequences, each method call and method return is
relevant. More precisely, we log the following for each call and return:
Unique object identity and type of caller and callee.
Name of the called method.
Unique object identity and type of parameters and return value.
Source code location of the event.
The source code location is necessary to disambiguate several calls to a par-
ticular method within one method. Each call and return is called an event. A
sequence of events is referred to as method trace. The instrumented program
writes all events into text files. For each thread of execution, a separate text
file is written.
As a running example consider the Java source code in Figure 4.3(a).
Instrumenting the program and executing method callM() can produce the
method trace shown in Figure 4.4, which assumes that the list li contains two
elements. Method traces of larger programs can contain millions of events.
The largest program run we analyzed during our experiments consists of over
83 million runtime events.
Search WWH ::




Custom Search