OntoUML / ontouml-vp-plugin

A plugin for Visual Paradigm to add support for OntoUML modeling and model intelligence services
Apache License 2.0
35 stars 15 forks source link

ERROR: Prohibited generalization: Mixing not allowed as supertype of Quality #152

Closed plbt5 closed 9 months ago

plbt5 commented 9 months ago

Using VP OntoUML plugin version 0.5.3, I get an error when subclassing a Mixin into a Quality. This is explicitly allowed by the ontoUML documentation

ERROR: Prohibited generalization: incompatible 'restrictedTo' values The allowed ontological natures of instances of Class5 are not among the allowed ontological natures of its superclass Class4

image
claudenirmf commented 9 months ago

Hi @plbt5!

In OntoUML, the non-sortal classes (i.e., «mixin», «category», «roleMixin», «phaseMixin», and «historicalMixin») can be specialized by classes of different ontological natures. For example, you can have a «mixin» that classifies both objects (e.g., cars) and relational entities (e.g., employment), like Insurable Item.

Screenshot 2023-10-12 at 10 57 45

For this reason, it is necessary to specify what are the possible natures for the instances of a non-sortal, otherwise, you will incur an error if the natures are different between the super-class and the subclass. To make this modification, you can right-click the class and use the Restrict Ontological Nature option.

Screenshot 2023-10-12 at 10 37 35

Since this property is hidden due to the limitations in UML's syntax (which is extended by OntoUML), the automatic color-coding serves as a hint to the value of this restrictedTo property (i.e., the property that registers the allowed ontological natures of the class' instances).

Notice that gray is used whenever there is no value set or there are multiple values related to different colors. In the plugin's Settings menu you can also disable the automatic coloring (Smart Paint) and other automated checks that restrict the menu.

I believe I have answered your query, so I am closing this issue. Feel free to keep commenting, so we can open it again if necessary.

plbt5 commented 9 months ago

Oy Claudenir, @claudenirmf

Thank you for your clear answer.

I'd suggest to add this to the ontoUML documentation about the <<mixin>>, or (maybe better) create a section on non-sortals where you can describe these more general features. Additionally, a section on the colour-coding would be helpful as well.

If you'd like my support to this or any other ontoUML/gUFO work, please do not hesitate to get in contact. Best Paul Brandt

claudenirmf commented 9 months ago

Thanks, that is really appreciated. We will certainly reach out for that.

At the moment I am focused on developer tools and documentation, which should facilitate us increasing our development team. We will follow that with user documentation and guides.

If you are interested in gUFO as well, I must say that, in my opinion, gUFO is our best-documented resource at the moment.