|
Re: Any type of Feature is allowed for Slots [message #1722881 is a reply to message #1722878] |
Wed, 10 February 2016 02:23 |
|
Hi, Roberto,
It's probably not a bug, but there may be enhancements hiding in the
corners. Validate the model and you should see problems indicating
problems in the specification of the slots. So, the tool does know
about these well-formedness rules and applies them.
The problem with restricting the assignment of features to slots is
that maybe you'd like assign a feature that you know isn't valid *now*
but that will be as soon as you get around to adding a generalization
somewhere in the class model. It could be annoying to have to stop and
switch contexts to that and then return to the instance modeling again.
OTOH, I suppose that an advanced-mode checkbox in the feature picker
dialog to provide access to all features everywhere
because-I-know-what-I'm-doing could mitigate the issue.
You might raise an enhancement request in Bugzilla for consideration of
how best to handle the ergonomics of instance modeling. At the very
least, it could be quite helpful to reduce the number of options for
feature selection in a model that has a large number of classes and
features. Wading through a tree presenting thousands of features can
be cumbersome.
Cheers,
Christian
On 2016-02-09 23:15:31 +0000, Roberto Saltini said:
> Hi All,
>
> I have noticed that it is possible to assign any Feature to a Slot of
> an InstanceSpecification, not only the Features related to one of the
> classifier of the InstanceSpecification.
>
> This seems to me to be in direct contrast to Paragraph 9.8.3 of UML 2.5
> specification which states that Quote:
>> A Slot specifies that an instance modeled by an InstanceSpecification
>> has a value or values for a specific StructuralFeature, which shall be
>> a StructuralFeature that is related to a classifier of the
>> InstanceSpecification owning the Slot by being a direct attribute,
>> inherited attribute, private attribute in a generalization, or a
>> memberEnd if the classifier is an Association, but excluding redefined
>> StructuralFeatures.
>
>
> Am I missing something or is this a bug?
>
> Thanks,
> R
|
|
|
|
Re: Any type of Feature is allowed for Slots [message #1722958 is a reply to message #1722883] |
Wed, 10 February 2016 14:18 |
|
Hi, Roberto,
Ah, indeed, well that sounds even more like a bug! Please do report it
to bugzilla if it hasn't already been reported before.
Cheers,
Christian
On 2016-02-10 03:32:36 +0000, Roberto Saltini said:
> Hi Christian,
>
> Thank you for the reply.
> However, I have just tried to create a "faulty" model where a slot was
> assigned with a Feature that was not related to the Classifier of the
> InstanceSpecification and the when I run the validation no errors where
> reported.
>
> The sample Papyrus project can be found here
> www.dropbox.com/sh/r9pzz5mr03q9nib/AACJfDfPbn6jYhGDkyaswlcla?dl=0
>
>
> Regards,
> R.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03523 seconds