Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[] About OCL for specifying and calculating derivation rules in a UML profile



Does someone know if it possible to use (as explained here ), OCL in Papyrus profile definition to specify a derivation rule of a derived property of a stereotype ? And in that case, when applyng the profile embedding the OCL rules, will the derived property value calculated automatically ?


Here is an example of profile :



Here is the derivation rule specification for the commonMeaning property:


The commonMeaning attribute is a derived property subetting the meanings attribute. The derivation rule shall be the following: the value of the commonMeaning attribute is calculated as being the Definition model element (i.e., owned comments stereotyped with <<Definition>> and annotating the owner element, in that case the Term itself). 


And here is an OCL rule, I tried to write to implement the derivation rule of the commonMeaning property:


self.commonMeaning: Definition derive:

self.base_Class.ownedComment-> select ( oc | oc.isStereotypeApplied(Definition) and oc.isCommon = true)


Thanks for helping,








Sébastien Gérard

Head of the LISE labs

CEA Research Director

Papyrus project Leader (


Commissariat à l’énergie atomique et aux énergies alternatives

Institut List | CEA Saclay Nano-INNOV | Bât. 862- PC174

F-91191 Gif-sur-Yvette Cedex

M. +33 6 88 20 00 47

T. +33 1 69 08 58 24






  cid:image004.png@01D1C880.5C951BE0  cid:image005.jpg@01D1C880.5C951BE0   



Back to the top