[Home]Design by Contract

HomePage | Recent Changes | Preferences

Design by Contract (or DBC) is the concept that classes have obligations to other classes based upon formalized rules between them. All class relationships are between Client classes and Supplier classes. A Client class is obligated to make calls to Supplier features where the resulting state of the Supplier is not violated by the Client call. Subsequently, the Supplier is obligated to provide a return state and data that does not violate the state requirements of the Client. For instance, a Supplier data buffer may require that data is present in the buffer when a delete feature is called. Subsequently, the Supplier guarantees to the client that when a delete feature finishes its work, the data item will, indeed, be deleted from the buffer. Other Design Contracts are concepts of "Class Invariant". The Class Invariant guarantees (for the local class) that the state of the class will be maintained within specified tolerances at the end of each feature execution.

HomePage | Recent Changes | Preferences
This page is read-only | View other revisions
Last edited December 14, 2001 8:14 am by The ansible (diff)
Search: