Functional Modeling with OCL Contracts
Commands and queries identified in the system sequence diagram must be implemented. Contracts are high-level specifications for those operations. They may be written in natural language or in a formal language such as OCL. This chapter presents a writing discipline for OCL contracts that avoids ambiguous interpretations and that is relatively easy to read and write. Contracts are composed of preconditions, postconditions, exceptions, and return values. Contracts for CRUDs are presented as well as contracts for other operations found in system sequence diagrams.
Keywords
System operation contract; precondition; postcondition; exception; formal specification; OCL; Object Constraint Language
Key Topics ...
Get Object-Oriented Analysis and Design for Information Systems now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.