OpenEnergyPlatform / ontology

Repository for the Open Energy Ontology (OEO)
Creative Commons Zero v1.0 Universal
106 stars 22 forks source link

There is currently only one* OWL Profile availible #1430

Closed areleu closed 1 year ago

areleu commented 1 year ago

Description of the issue

Is it intentional that the ontology only uses the OWL2 Full profile? Currently it is not a valid DL ontology and it would be nice to have a RL profile. What is the most reasonable way of having automatic convertion to these profiles?

Ideas of solution

Does robot have a function to convert to a lower profile? If not then we have to remove the incopatible axioms with different means.

Workflow checklist

fabianneuhaus commented 1 year ago

The ontology is supposed to be written in OWL 2 DL, not OWL 2 Full. Could you point out axioms that violate the DL constraints?

Concerning extracting different profiles: I don't know about Robot, but the OWL API is able to validate profiles and identify axioms that are outside a given profile.

areleu commented 1 year ago

Here is an example of the DL profile validation report:

https://gist.github.com/areleu/c7d2c5580bc2f6b4fcb3895fcd1838b5

I ran this using the compiled ontology in the OEP:

http://openenergy-platform.org/ontology/oeo/releases/oeo-full.omn

It seems that the problem is only a specific annotation done multiple times in the file.

Also the pipeline is currently validating against the full profile. Would it make sense to change it to DL?

https://github.com/OpenEnergyPlatform/ontology/blob/15a8b13a1dd2850b12387ca452ec8a3a528bf6e4/.github/workflows/automated-testing.yml#L27

I noticed that validating like this won't make the pipeline fail. If needed I can think of a way of making this check more strict.

fabianneuhaus commented 1 year ago

I found the problem (or at least one). oeo-physical contains the axiom AnnotationProperty: owl:equivalentClass

That's not supposed to happen. owl:equivalentClass is a reserved term in the OWL language. It is neither an annotation property nor any other property (or part of the signature of the ontology). Hermit and other OWL reasoners haven't detected it, because they ignore annotations anyway. But the validator throws warnings for each class that uses this kind of 'annotation'.

The solution would be either to (a) replace "owl:equivalentClass" with some annotationproperty that is not within the reserved OWL namespace, e.g. synonym_with (b) or add proper axioms using these classes

l-emele commented 1 year ago

We currently use this to annotate same or similar concepts in other ontologies, especially ENVO. In my view, it is best to introduce a special annotation property for this. Something like similar concept in external ontology.

fabianneuhaus commented 1 year ago

Maybe we could reuse

'may be identical to' from the IAO? (IAO:0006011)?

l-emele commented 1 year ago

Of course reusing an existing annotation property is even better.

l-emele commented 1 year ago

This issue has gone stale, but it would be nice to solve and implement this before the next release which is planned for next week.

@areleu @fabianneuhaus @stap-m : Do we all agree replacing owl:equivalentClass with may be identical to from IAO?

areleu commented 1 year ago

I will take over this today.

areleu commented 1 year ago

So I have a pull request almost ready to replace owl:equivalentClass with may be identical to if we agree on doing this then we can just merge that

areleu commented 1 year ago

After fixing this now we have a single violation:

OWL 2 DL Profile Report: Ontology and imports closure NOT in profile. The following violations are present:
Use of non-simple property in a restriction: ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/BFO_0000051> <http://openenergy-platform.org/ontology/oeo/OEO_00000253>) [SubClassOf(<http://openenergy-platform.org/ontology/oeo/OEO_00000143> ObjectMinCardinality(1 <http://purl.obolibrary.org/obo/BFO_0000051> <http://openenergy-platform.org/ontology/oeo/OEO_00000253>)) in OntologyID(OntologyIRI(<http://openenergy-platform.org/ontology/oeo/>) VersionIRI(<http://openenergy-platform.org/ontology/oeo/releases/1.13.0/oeo.omn>))]

Any idea on why is this @fabianneuhaus

areleu commented 1 year ago

I found the solution: In the definition of electricity grid use has part some power line instead of has part min 1 power line. This is because DL is not compatible with non-simple restrictions. If we want to keep that single axiom we would have to release an extra ontology file just to be conforming with DL.

l-emele commented 1 year ago

In the definition of electricity grid use has part some power line instead of has part min 1 power line.

I am fine with this simplification.

areleu commented 1 year ago

The ontology is now DL compliant. For any other profile request please add new issue!