nemo-ufes / ufo-protege-plugin

A plugin for Protégé that checks gUFO-based ontologies for adherence to UFO rules
GNU General Public License v3.0
7 stars 0 forks source link

Implement rule: an instance of RigidType cannot specialize an instance of AntiRigidType #6

Closed lcbarcellos closed 4 years ago

lcbarcellos commented 4 years ago

Rule

An instance of gufo:RigidType cannot specialize an instance of gufo:AntiRigidType

Source

Fifth rule from Table 1 of paper Endurant Types in Ontology-Driven ConceptualModeling: Towards OntoUML 2.0, presented on page 13 of document.

From (t7), a class representing a rigid type {«kind», «relatorKind», «modeKind»,«qualityKind», «subkind», «category»} cannot specialize a class representing an anti-rigid type {«role», «phase», «roleMixin», «phaseMixin»}.

lcbarcellos commented 4 years ago

This constraint covers two other constraints from A modeling infrastructure for OntoUML, section 6.1, page 49, using other terminology:

Rigid Sortal does not specialize Anti-Rigid A RigidSortal cannot have an Anti-Rigid parent (Role, Phase and RoleMixin)

context RigidSortalClass inv:
self.parents()->select( x | x.oclIsKindOf(AntiRigidSortalClass) or
    x.oclIsKindOf(RoleMixin) )->isEmpty()

Category does not specialize RoleMixin A Category cannot have a Role Mixin parent

context Category inv:
parents()->select( x | x.oclIsTypeOf(RoleMixin) )->isEmpty()
lcbarcellos commented 4 years ago

Validated by RigidityRule class