Interface Contracts

NOTE:This section is under construction.

Interface contracts provide a mechanism for helping ensure software is implemented and used correctly. They define the semantics of interfaces in terms of the behaviors expected of callers and callees (or implementations) of methods. Contracts are formed by precondition, postcondition, and/or class invariant clauses in the interface specification. Clauses apply to all classes inheriting their specification. Hence, all implementations of the specification -- regardless of programming language used -- are expected to comply with the defined contracts. Compliance is checked at runtime when enforcement is enabled.

WARNING:Interface contracts are an experimental feature so not all of the capabilities described in this document have been tested. In particular, regression tests exercising class invariants and a number of the built-in functions available for use in contract clauses are still pending.



Subsections



babel-1.4.0
users_guide Last Modified 2008-10-16

http://www.llnl.gov/CASC/components
components@llnl.gov