Databases Reference
In-Depth Information
6.6.1.1
Static Client Inspection :::::::::::::::::::::::::::::::::: 182
6.6.1.2
Static Component Inspection :::::::::::::::::::::::::::: 182
6.6.2
Dynamic Inspection ::::::::::::::::::::::::::::::::::::::::::::::: 182
6.6.3
Selection of Paths for Inspection :::::::::::::::::::::::::::::::::: 183
6.6.4
Renement Based on Abstraction Merge Points :::::::::::::::::: 183
6.7
Experimental Results ::::::::::::::::::::::::::::::::::::::::::::::::::::: 186
6.7.1
Benchmarks ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 186
6.7.2
Results ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 187
6.7.3
Discussion ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 190
6.7.3.1
Soundness :::::::::::::::::::::::::::::::::::::::::::::::: 191
6.7.3.2
Limitations ::::::::::::::::::::::::::::::::::::::::::::::: 192
6.8
Related Work ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 193
6.9
Conclusion ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 196
Bibliography ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 196
6.1
Introduction
There is only one thing more painful than learning from experience
and that is not learning from experience.
{ Archibald MacLeish
Programming is becoming more and more about using frameworks and
libraries. To perform standard tasks such as parsing an XML file, or commu-
nicating with a database, programmers use existing standard frameworks and
class libraries rather than writing code from scratch.
While much easier than writing code from scratch, using a library is not
a trivial task. A typical library API (application programming interface) can
involve thousands of classes, with tens of methods each, and specific sequences
of operations that have to be invoked to perform a task. For example, sending
a file over a socket using standard libraries in Java involves instantiating 4
classes, and calling 10 methods on them. More sophisticated tasks can easily
span tens of classes with tens of methods to be invoked in specific sequence,
also handling possible error conditions along the way.
It is common for library objects (components) to maintain an internal
state, and to change their behavior and permitted operations based on this
internal state. For example, a socket component may allow reading or writ-
ing when it is in its connected state, but may yield an error if reading or
writing is attempted when it is in its closed state. Components often have an
implicit temporal specification, describing what sequences of method calls are
permitted on a component.
Mainstream programming languages such as Java and C# provide no sup-
port for statically checking the correct use of library APIs. To write code that
 
Search WWH ::




Custom Search