#ocl #expression #modeling #language
OCL, the Object Constraint Language, is a powerful expression language for UML, SysML, and other languages based on UML. Unfortunately, there is no good documentation around for using OCL inside tools like MagicDraw and such. But, at least we have some input from which we can extract most important aspects.
Here is my link collection on OCL. The bad news are, this stuff is pretty old and it also varies in its statements. Either nobody is really working on it as a core module anymore or we just cannot find fresh insights here. Feel free to write me if you find any better resources.
Definition
- Definition wikipedia
https://de.wikipedia.org/wiki/Object_Constraint_Language
Quick Reference
- http://computerscience.unicam.it/culmone/?download=ocl-ref-short.pdf
- useful cheat sheet, syntax not always correct in our environment though
http://www-sop.inria.fr/members/Charles.Andre/CAdoc/ESINSA/UMLOCL-memo.pdf
Tutorial
- Overview and introduction slides, University of Dresden, creators of the OCL engine used in MagicDraw, probably best reference we got
https://st.inf.tu-dresden.de/files/teaching/ss09/stII09/OCL.pdf - Specification with OCL, University of Utrecht
http://st.inf.tu-dresden.de/files/teaching/03-swe-ocl.pdf - Home page of OCL Portal, cannot find much useful or up-to-date stuff though
https://st.inf.tu-dresden.de/oclportal/ - Cabot/Gogolla
https://modeling-languages.com/ocl-tutorial/ - Introduction slides, University of Koblenz, mostly focused on classifiers but not stereotypes, be aware of syntax issues too
https://formal.iti.kit.edu/~beckert/teaching/Verification-SS06/10OCL.pdf
Standard
- Official standard, specification, part of UML standard
https://www.omg.org/spec/OCL/2.0/PDF
API Reference
- API Reverence
eclipse Acceleo/OCL Operations Reference
https://wiki.eclipse.org/Acceleo/OCL_Operations_Reference
MagicDraw
- How to create validation rule using OCL
https://docs.nomagic.com/display/MD190SP4/Create+OCL2.0+validation+rule