Search code examples
uml

In UML, what is the semantic difference between 'ownedParameter' and 'parameter' in a 'TemplateSignature'?


The UML specification, in its version 2.5.1, in the meta-model for Templates, defines 'TemplateSignature' as a Classifier composed of 'ownedParameters', and owning 'parameters'. An image is best to explain these relationships:

Diagram portion

Please find the complete meta-model on the UML specification document, on clause 7.3.2, page 23. As you can see in the image, 'ownedParameter' subsets 'parameter'. Their semantics seem to be equivalent, i.e. they represent the parameters of the template signature. But if that's the case, then what's the point of having them separate?

What I've tried:

I've been thinking about this for quite a while. The only reasonable semantic interpretation that I've come up with, is that a 'TemplateSignature' owns a set of 'parameters', but it can also be composed of more "special" parameters called 'ownedParameters', which let's say, get deeper into the 'TemplateSignature', meaning, that 'ownedParameters' are composing the 'TemplateSignature', while 'parameters' are only owned by the 'TemplateSignature' and so their relationship is weaker.

This difference seems a little irrelevant, but it could serve to differentiate between two sets of parameters, composing and not composing. Maybe a model can do different things with the two groups of parameters? Do some things with the composing parameters, and do other things with the non-composing parameters? None of this is explained inside the UML specification to the best of my knowledge.


Solution

  • Actually, it is quite simple. A signature might refer to parameters that are not owned by it. The meaning of the parameters is not affected by who owns them. So for the semantics, you just need to look at the parameter property.

    I think there is only one way, how this happens: When you specialize a template and extend its signature. enter image description here inheritedParameter is a subset of parameter. Inherited parameters have the same meaning as parameters owned by the extendedSignature. Therefore it makes sense to combine them in one attribute.

    PS: parameter should probably be derived by a union of its subsets. I suspect this is a bug in the specification. My tool says it is read only, but on the other hand doesn't update it correctly.