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

February 2012

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on May 14, 2005 5:26 AM.

Why OCL? was the previous entry in this blog.

活用Gmail is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.