No edit summary |
No edit summary |
||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
'''What is Object Constraint Language''' | '''What is Object Constraint Language''' | ||
The '''Object Constraint Language (OCL)''' is a [[wikipedia:Declarative_programming|declarative language]] 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. OCL may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. | The '''Object Constraint Language (OCL)''' is a [[wikipedia:Declarative_programming|declarative language]] 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. OCL may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. The Object Constraint Language 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|'''OCL Video Tutorials''']] | Learn more with ☛ [[OCL Expressions|'''OCL Video Tutorials''']] | ||
Line 15: | Line 16: | ||
* Action Enable expression | * Action Enable expression | ||
* State machine Guards | * State machine Guards | ||
MDriven relies heavily on OCL and it is a very powerful tool to describe constraints, actions and transformations in your model. | |||
[[ | [[OCL Expressions|'''OCL expression''']] 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 – so we use the exact same syntax as OCL in something we call [[EAL – ExtendedActionLanguage.|'''EAL – ExtendedActionLanguage.''']] | ||
[[ | ==== [[OCLps|'''OCLps''']] ==== | ||
'''[[Methods]]''' | ==== [[Seeking the database with OCLps|'''Seeking the database with OCLps''']] ==== | ||
==== [[OCLOperators|'''OCLOperators''']] ==== | |||
==== [[Certain important constructs|'''Certain important constructs''']] ==== | |||
==== '''[[Methods]]''' ==== | |||
More articles: | |||
==== [[Unique constraints on 1 to 1 links]] ==== | |||
==== [[GuardConstraints]] ==== | |||
==== [[ClassFromString]] ==== | |||
====[[Understanding OCL with reference to SQL]]==== | |||
==== [[Custom types and custom operations in OCL]] ==== | |||
==== [[A few words on linq]] ==== | |||
==== '''[[OCL by example]]''' ==== | |||
[[Category:OCL]] | |||
[[Category:Discovery]] | |||
<html> | |||
<style> | |||
h4 .mw-headline a:first-of-type { | |||
display: block; | |||
padding: 12px !important; | |||
border: 2px solid #f7f7f7; | |||
border-radius: 4px; | |||
max-width: 560px; | |||
text-decoration: none; | |||
animation: all 400ms ease-in-out; | |||
} | |||
h4 .mw-headline a:first-of-type:hover { | |||
background: #fbfbfb; | |||
text-decoration: none; | |||
animation: all 400ms ease-in-out; | |||
} | |||
</style> | |||
</html> |
Revision as of 09:58, 31 October 2019
What is Object Constraint Language
The Object Constraint Language (OCL) is a declarative language 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. OCL may now be used with any Meta-Object Facility (MOF) Object Management Group (OMG) meta-model, including UML. The Object Constraint Language 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 constraint definition on a class
- As description of derivation rule on derived attributes
- As description of derivation of derived associations
- As ViewModel columns and Nesting definitions
- As definitions for Visible and Enable state for ViewModel columns
- As expression of style information on ViewModel columns
- As expression for object presentation on classes
- Action Enable expression
- State machine Guards
MDriven relies heavily on OCL and it is a very powerful tool to describe constraints, actions and transformations in your model.
OCL expression 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 – so we use the exact same syntax as OCL in something we call EAL – ExtendedActionLanguage.
OCLps
Seeking the database with OCLps
OCLOperators
Certain important constructs
Methods
More articles:
Unique constraints on 1 to 1 links
GuardConstraints
ClassFromString
Understanding OCL with reference to SQL
Custom types and custom operations in OCL
A few words on linq
OCL by example