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 2 forks source link

Implement rule: every instance of Sortal which is not instance of Kind must specialize an instance of Kind #3

Closed lcbarcellos closed 4 years ago

lcbarcellos commented 4 years ago

Rule

Every instance of gufo:Sortal which is not instance of gufo:Kind must specialize an instance of gufo:Kind

Source

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

From (t24), every class representing an endurant sortal that is not a kind (including«subkind», «role», «phase») specializes a class decorated with a stereotype from the set {«kind», «relatorKind», «modeKind», «qualityKind»}.

lcbarcellos commented 4 years ago

This same constraint is expressed in A modeling infrastructure for OntoUML, section 6.1, page 48, using other terminology:

Concrete Sortal has Substance Sortal ancestor Every non-abstract Sortal must have a Substance Sortal ancestor (or be a Substance Sortal)

context SortalClass inv:
not isAbstract and not oclIsKindOf(SubstanceSortal)
implies:
allParents()->exists( x | x.oclIsKindOf(SubstanceSortal) )
lcbarcellos commented 4 years ago

Validated by OnlyAKindRule class