Difference between revisions of "OCL"
From Suhrid.net Wiki
Jump to navigationJump to searchLine 1: | Line 1: | ||
− | + | = Introduction = | |
* How can we express constraints in UML ? | * How can we express constraints in UML ? | ||
Line 5: | Line 5: | ||
* UML only has a notion of an informal constraint in terms of a note - which can be attached to a model. However its just text. | * UML only has a notion of an informal constraint in terms of a note - which can be attached to a model. However its just text. | ||
* To write formal and machine checkable constraints - we use the Object Constraint Language (OCL). | * To write formal and machine checkable constraints - we use the Object Constraint Language (OCL). | ||
+ | |||
+ | |||
[[Category:OODE]] | [[Category:OODE]] |
Revision as of 06:01, 30 October 2011
Introduction
- How can we express constraints in UML ?
- E.g. the balance attribute in a SavingsAccount class can never be less than zero and more than 100000.
- UML only has a notion of an informal constraint in terms of a note - which can be attached to a model. However its just text.
- To write formal and machine checkable constraints - we use the Object Constraint Language (OCL).