May 14, 2005

Where to Use OCL

OCL can be used for a number of different purposes:
• As a query language
• To specify invariants on classes and types in the class model
• To specify type invariant for Stereotypes
• To describe pre- and post conditions on Operations and Methods
• To describe Guards
• To specify target (sets) for messages and actions
• To specify constraints on operations
• To specify derivation rules for attributes for any expression over a UML model.
其實這都是資料層的Constraints,更重要的是系統層的Constraints。如:定速器啟動時控制油門,油門增加代表車速也必須增加。以便檢查定速器或是車速感應器有錯誤。
constraints.JPG

OCL需要嗎

Posted by philipz at May 14, 2005 05:26 AM
歷史上的今天
Comments
Post a comment













Remember personal info?