|
Re: validating OCL in UML Profile (with Papyrus) [message #1589787 is a reply to message #1589767] |
Wed, 28 January 2015 17:01 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Fadwa,
That's a flaw in the UML Specification, which defines the Extension multiplicity as Metaclass [1] <---- [0..*] Stereotype
This means that a Stereotype must be associated to exactly one base_Element. However, when a Stereotype can extend several metaclasses, you have several extension, each with a multiplicity of 1. But you can apply a Stereotype to only one UML Element, so you can satisfy this constraint for only one of the extensions.
I think there's an issue which has been raised at the OMG for this problem, but it hasn't been solved.
From an implementation point of view, I guess the multiplicity of base_X properties should be set to [0..1] instead of [1] during the Profile Definition, when more than one metaclass is extended by a Stereotype. This could be implemented in the Eclipse/UML2 component
Camille
Camille Letavernier
|
|
|
Re: validating OCL in UML Profile (with Papyrus) [message #1589816 is a reply to message #1589787] |
Wed, 28 January 2015 17:22 |
Ed Willink Messages: 7670 Registered: July 2009 |
Senior Member |
|
|
Hi Camille
I don't see this in the specification at all.
An Extension may only extend one metaclass, but there may be many
extensions.
Historically Eclipse UMLs has given spurious base_XXX must be srt
diagnostics; perhaps this is a new vatiant.
Papyrus, I think. lacks support for the isRequired=true/false
characteristic of an Extension.
Fig 12.17 seems to advocate [0..1]
Regards
Ed Willink
On 28/01/2015 17:01, Camille Letavernier wrote:
> Hi Fadwa,
>
> That's a flaw in the UML Specification, which defines the Extension
> multiplicity as Metaclass [1] <---- [0..*] Stereotype
>
> This means that a Stereotype must be associated to exactly one
> base_Element. However, when a Stereotype can extend several
> metaclasses, you have several extension, each with a multiplicity of
> 1. But you can apply a Stereotype to only one UML Element, so you can
> satisfy this constraint for only one of the extensions.
>
> I think there's an issue which has been raised at the OMG for this
> problem, but it hasn't been solved.
>
> From an implementation point of view, I guess the multiplicity of
> base_X properties should be set to [0..1] instead of [1] during the
> Profile Definition, when more than one metaclass is extended by a
> Stereotype. This could be implemented in the Eclipse/UML2 component
>
> Camille
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09826 seconds