Databases Reference
In-Depth Information
imum execution time is around 37 minutes (jython with 54 million runtime
events); the analysis of most method traces requires less than 20 minutes.
The reason for the linearity of the execution times in Figure 4.10 is that
our analysis analyzes each collaboration independently from the others. Hence,
a larger method trace with more collaborations only influences the analysis
execution time linearly.
4.5 Discussion and Applications
This section discusses various issues related to our work and possible ap-
plications of it.
4.5.1 Dynamic versus Static Analysis
Our analysis derives protocols of typical API usage by observing the run-
time behavior of existing applications. Such a dynamic analysis is limited
to the execution paths taken in the analyzed programs, and hence, cannot
infer every possible API usage. Static analysis of API source code can in-
fer specifications that cover the entire API, for instance, by considering all
non-exceptional paths to be legal [5, 19] or based on known facts about ar-
ray accesses [44]. In contrast to these static approaches, our analysis focuses
on common API usage that actually happens at runtime, ignoring dead code
and infrequent program paths. Moreover, dynamic analysis provides precise
information about types and aliasing properties of objects, whereas static ap-
proaches can only approximate actual behavior.
Achieving a satisfying coverage of typical ways to use an API is a particular
challenge for dynamic specification miners. We address it by providing an
analysis that scales linearly with the number of runtime events to analyze. As
a result, API usage patterns from different programs can be gathered, which
together provide a broad view of the API's usage.
Another potential problem is erroneous behavior in the analyzed programs.
Given an execution trace containing mostly incorrect sequences of API calls,
our analysis obviously infers incorrect protocols. However, our experiments
and those reported by others [6] show that executed program paths are mostly
correct. By removing infrequent collaborations and weighting each transition
in an FSM, the protocols our analysis infers can be considered correct in most
cases.
4.5.2 Limitations
The mining techniques presented in Section 4.2 assume certain properties
of API usage protocols. By considering object collaborations, our analysis is
 
Search WWH ::




Custom Search