Components have long promised to encapsulate data and programs into a box t
hat operates predictably without requiring that users know the specifics of
how it does so. Many advocates have predicted that components will bring a
bout widespread software reuse, spawning a market for components usable wit
h such mainstream software buses as the Common Object Request Broker Archit
ecture (CORBA) and the Distributed Component Object Model (DCOM). In the Wi
ndows world, at least, this prediction is becoming a reality.
Yet recent reports indicate mixed results when using and reusing components
in mission-critical settings. Such results raise disturbing questions. How
can you trust a component? What if the component behaves unexpectedly, eit
her because it is faulty or simply because you misused it?
Before we can trust a component in mission-critical applications, we must b
e able to determine, reliably and in advance, how it will behave. In this a
rticle the authors define a general model of software contracts and show ho
w existing mechanisms could be used to turn traditional components into con
tract-aware ones.