No edit summary |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
'''What is Object Constraint Language?''' | '''What is Object Constraint Language?''' | ||
The '''Object Constraint Language (OCL)''' is a [[wikipedia:Declarative_programming|declarative language]] used for describing rules that apply to [[UML School|Unified Modeling Language (UML)]] models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML | The '''Object Constraint Language (OCL)''' is a [[wikipedia:Declarative_programming|declarative language]] used for describing rules that apply to [[UML School|Unified Modeling Language (UML)]] models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML, but now it may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. It is a precise text language that provides constraint and object query expressions on any MOF model or meta-model that cannot otherwise be expressed by diagrammatic notation. OCL is a key component of the new OMG standard recommendation for transforming models, the Queries/Views/Transformations (QVT) specification. | ||
Learn more with ☛ [[OCL Expressions| | Learn more with ☛ '''[[Training:OCL Expressions|OCL Video Tutorials]]''' | ||
Different ways MDriven relies on OCL: | === Different ways MDriven relies on OCL: === | ||
* As a constraint definition of a class | * As a constraint definition of a class | ||
* As a description of the derivation rule on derived attributes | * As a description of the derivation rule on derived attributes | ||
Line 17: | Line 17: | ||
* As Action Enable expression | * As Action Enable expression | ||
* As State machine Guards | * As State machine Guards | ||
MDriven relies heavily on OCL | MDriven relies heavily on OCL which is a very powerful tool for describing constraints, actions, and transformations in your model. | ||
[[OCL Expressions|'''OCL | [[OCL Expressions|'''OCL expressions''']] must be without side effects. It is a query language and as such, it is not expected to change data as the language is applied. In MDriven, we do however want to change data when appropriate. We use the same syntax as OCL in something we call [[EAL – ExtendedActionLanguage.|'''EAL – Extended Action Language.''']] | ||
== Explore OCL == | |||
==== [[OCLps|'''OCLps''']] ==== | ==== [[OCLps|'''OCLps''']] ==== | ||
==== [[ | ==== [[Seeker view]] ==== | ||
==== [[OCLOperators|'''OCLOperators''']] ==== | ==== [[OCLOperators|'''OCLOperators''']] ==== | ||
Line 30: | Line 32: | ||
==== '''[[Methods]]''' ==== | ==== '''[[Methods]]''' ==== | ||
More | |||
== More Articles == | |||
==== [[Unique constraints on 1 to 1 links]] ==== | ==== [[Unique constraints on 1 to 1 links]] ==== | ||
Line 42: | Line 45: | ||
==== [[Custom types and custom operations in OCL]] ==== | ==== [[Custom types and custom operations in OCL]] ==== | ||
==== [[A few words on linq]] ==== | ==== [[A few words on linq|A few words on Linq]] ==== | ||
==== '''[[OCL by example]]''' ==== | ==== '''[[OCL by example|OCL by Example]]''' ==== | ||
[[Category:OCL]] | [[Category:OCL]] | ||
[[Category:Discovery]] | [[Category:Discovery]] | ||
{{Edited|July|12|2024}} | |||
} | |||
} | |||
Latest revision as of 05:13, 14 February 2024
What is Object Constraint Language?
The Object Constraint Language (OCL) is a declarative language used for describing rules that apply to Unified Modeling Language (UML) models developed at IBM and now part of the UML standard. Initially, OCL was only a formal specification language extension to UML, but now it may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. It is a precise text language that provides constraint and object query expressions on any MOF model or meta-model that cannot otherwise be expressed by diagrammatic notation. OCL is a key component of the new OMG standard recommendation for transforming models, the Queries/Views/Transformations (QVT) specification.
Learn more with ☛ OCL Video Tutorials
Different ways MDriven relies on OCL:
- As a constraint definition of a class
- As a description of the derivation rule on derived attributes
- As a description of the derivation of derived associations
- As ViewModel columns and Nesting definitions
- As definitions for Visible and Enable state for ViewModel columns
- As an expression of style information on ViewModel columns
- As an expression for object presentation of classes
- As Action Enable expression
- As State machine Guards
MDriven relies heavily on OCL which is a very powerful tool for describing constraints, actions, and transformations in your model.
OCL expressions must be without side effects. It is a query language and as such, it is not expected to change data as the language is applied. In MDriven, we do however want to change data when appropriate. We use the same syntax as OCL in something we call EAL – Extended Action Language.