Home » Modeling » Papyrus » MARTE model not valid, base_Property, base_Event(An error pointing out the missing base_Property, base_Event, base_InstanceSpecification is very confusing)
|
Re: MARTE model not valid, base_Property, base_Event [message #1194432 is a reply to message #1193291] |
Mon, 18 November 2013 14:03 |
|
Hi, Damjan,
Those properties of the <<clock>> stereotype are metaclass extension
ends, referencing the UML model element to which the stereotype is
applied. An "instance" of a stereotype can only be applied to one
model element so, for example, the <<clock>> stereotype applied to an
InstanceSpecification cannot have the base_Property and base_Event set
because its base_InstanceSpecification is already set.
Because these base_Xyz extension ends are mutually exclusive, model
validation should not be complaining that they are not all set. In any
case, you cannot set them all; it would not make sense. Perhaps the
problem is in the MARTE profile: does the Clock stereotype have a
[1..1] multiplicity on all of these extension ends?
HTH,
Christian
On 2013-11-18 13:36:37 +0000, Damjan Temelkovski said:
> Hi,
>
> I made a class diagram in a model with some MARTE Clocks and properties
> with the <<clock>> stereotype and I tried to validate it only to
> receive some error. I am having trouble understanding how to set
> certain required features that Papyrus seems to ask for. They are
> probably required by the MARTE specification, but I cannot seem to find
> a way to set a
> base_Property and a base_Event for a MARTE Clock
>
> also, I don't know how to set the required features
>
> base_Event anad base_InstanceSpecification on a property that has the
> <<clock>> stereotype.
>
> Any help and guidance will be very appreciated,
> thank you
>
> Damjan
|
|
|
Re: MARTE model not valid, base_Property, base_Event [message #1194586 is a reply to message #1194432] |
Mon, 18 November 2013 15:38 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi Christian,
This is actually a bug in the UML Specification. base_* is required (1..1). But when there is more than one possible base element, this should be 0..1 (With a constraint to enforce exactly one base element).
If you specify "0..1" for base_*, then the profile is invalid. If you specify "1..1" for base_*, then the profiled models are invalid.
It might be worth fixing the Eclipse UML2 profile definition: define 1..1 in the UML Profile, then transform to 0..1 into Ecore (If there is more than one possible base element, 1..1 otherwise), and automatically add a constraint to specify the "XOR" for base element.
Regards,
Camille
Camille Letavernier
|
|
|
Re: MARTE model not valid, base_Property, base_Event [message #1194851 is a reply to message #1194586] |
Mon, 18 November 2013 18:32 |
|
Thanks, Camille,
That makes sense. This sounds like a good bugzilla for MDT UML2. I
think your suggestion for the Ecore transformation is a good one, but
perhaps UML2 might also anticipate a fix in the UML spec by letting the
multiplicities make sense also in the UML profile. :-)
cW
On 2013-11-18 15:38:55 +0000, Camille Letavernier said:
> Hi Christian,
>
>
> This is actually a bug in the UML Specification. base_* is required
> (1..1). But when there is more than one possible base element, this
> should be 0..1 (With a constraint to enforce exactly one base element).
>
> If you specify "0..1" for base_*, then the profile is invalid. If you
> specify "1..1" for base_*, then the profiled models are invalid.
>
> It might be worth fixing the Eclipse UML2 profile definition: define
> 1..1 in the UML Profile, then transform to 0..1 into Ecore (If there is
> more than one possible base element, 1..1 otherwise), and automatically
> add a constraint to specify the "XOR" for base element.
>
>
> Regards,
> Camille
|
|
|
Re: MARTE model not valid, base_Property, base_Event [message #1195296 is a reply to message #1194851] |
Mon, 18 November 2013 23:26 |
Damjan Temelkovski Messages: 16 Registered: November 2013 |
Junior Member |
|
|
Hi,
Christian and Camille, thank you very much for the quick response.
Looking into the MARTE specification, I see that a MARTE clock can extend an Event, a Property, or an InstanceSpecification. However, It's not that obvious about the multiplicity in the document that I was reading.
Anyway, it makes sense that it shouldn't have all of those features. I'll try to work around this issue, there has to be a way around, clocks are the most important part of MARTE (at least regarding time), it has to be possible to make a valid model in Papyrus.
Thank you again, I'll post if I manage to achieve something.
Damjan
|
|
|
Goto Forum:
Current Time: Fri Apr 26 09:20:41 GMT 2024
Powered by FUDForum. Page generated in 0.03459 seconds
|