CommonCoreOntology / CommonCoreOntologies

The Common Core Ontology Repository holds the current released version of the Common Core Ontology suite.
Other
160 stars 44 forks source link

SHACL and Modal Relations #157

Open zwelz3 opened 1 year ago

zwelz3 commented 1 year ago

Hello, first thanks for putting in so much work on the CCO. We are finding it useful for managing semantics within our decision support frameworks.

We are using cco:ArtifactModel (and other DICE in the near-future) as a sort of "blueprint" to auto-generate SHACL shapes graphs. The idea is to determine if there is a continuant (or more than one) that "satisfies" an artifact model by validating each continuant via SHACL (as a sh:targetNode).

The issue we are running into is that there does not appear to be a way to determine the link between a relationship (in the CCO, BFO, RO) and its modal relation (in the MRO). This means that there is not obvious way (without some gnarly regex filters that cause a massive increase in the number of validation rules) to determine the appropriate sh:path that an instance of a continuant should have in order to be validated by the definition on the artifact model (which will be the MRO relation).

For example, if we have a simple artifact model:

ex:ArtifactModel1 a cco:ArtifactModel, owl:NamedIndividual ;
    mro:RO_0000085 ex:Function1 ;   # "has function" predicate
.

We can (currently) at best, auto-generate the following shapes graph:

ex:ArtifactModel1Shape
    a sh:NodeShape ;
    sh:targetNode ex:ArtifactModel1 ;
    sh:property [
        sh:path mro:RO_0000085 ;
        sh:hasValue ex:Function1 ;
    ] .

The issue arises when we have an instance that is "valid" as a "solution" to the artifact model:

ex:Artifact1 a cco:Artifact, owl:NamedIndividual ;
    bfo:RO_0000085 ex:Function1 ;
.

However, bfo:RO_0000085 is not mro:RO_0000085. Since the path generated from the artifact model specifies the modal relation, we cannot validate the instance. If there was some axiom linking the modal relation to its corresponding relation in the CCO/BFO/RO/etc., we could recover this (e.g. with a SHACL Property Path).

Is there an extension to the MRO that contains these axioms, or any plan to add them for this type of linking?

zwelz3 commented 1 year ago

It seems there is a 1:1 when matching the labels of the MRO to the other ontologies within the CCO. I was at least able to generate an extension to the MRO that allows SHACL to perform inference via OWL-DL using the attached axioms. I am unsure if this is the best way to handle the issue.

I would be happy to submit the extension as a PR if it would be useful to others.

Note: the ttl file is uploaded as txt to conform to github file restrictions. ModalEquivalenceExtension.txt

zwelz3 commented 1 year ago

We have a fork up on our org repo that includes these changes. Not sure if there is a proper way to submit this as a PR so I will hold off until I hear back from a mod/admin for the CCO.

https://github.com/jupyrdf/CommonCoreOntologies/tree/modal-equivalence-ext

cameronmore commented 2 weeks ago

(I am not speaking on behalf of all the developers, this is just the sense I have personally gathered)

Apologies for not commenting on this issue sooner, but yes, this seems like the best way forward. MRO has been described as a 'helper file' to talk about non existent things, plans, model specifications, and so on, and the labels and definitions should reflect the non-modal relations 1 to 1. Everything the same, same semantics, but modal.

Since MRO is a 'helper' file, I know of no plans to create axioms linking it to the non-modal relations, but this is a valid strategy.