RDFLib / OWL-RL

A simple implementation of the OWL2 RL Profile on top of RDFLib: it expands the graph with all possible triples that OWL RL defines. It can be used together with RDFLib to expand an RDFLib Graph object, or as a stand alone service with its own serialization.
http://www.ivan-herman.net/Misc/2008/owlrl/
Other
144 stars 30 forks source link

Add test to demonstrate owl:Axiom interpretations in inferencing #52

Open ajnelson-nist opened 2 years ago

ajnelson-nist commented 2 years ago

I've been inspecting owl:Axiom for potential use in a project. (What I'm trying to do is out of scope of this patch series, but the short of it is, I'm trying to almost but not entirely assert a triple, while remaining in OWL 2 DL. Subclassing owl:Axiom looks like it might work, but reviewing the OWL 2 specs has left me spinning. It's not obvious to me whether this is a good idea or an explicit faux pas. If you know one way or the other offhand, I'd appreciate hearing it! Meanwhile, relevant to the RDFLib OWL-RL project, I may have found a bug.)

I am having difficulty finding in the OWL specifications how owl:Axiom is supposed to behave when its described triple is not already asserted(/present) in the graph. Would any of this repository's maintainers be able to help answer some of these questions, encoded in a unit test added in this patch series? (Patch 1 has a commit message providing further detail.)

I appreciate some of this may be out of scope of RL-specific functionality, but it appears from Issues 33 and 35 that this repository is looking to slightly expand its scope beyond RL. Please let me know if there is a better venue for this line of questions.

ajnelson-nist commented 2 years ago

Also, I'm aware this first version of the unit test fails. I currently think it hits unimplemented functionality in closure construction.

aucampia commented 2 years ago

Not an OWL expert, but I always have good luck asking at https://gitter.im/linkeddata/chat - so maybe that helps.

ajnelson-nist commented 2 years ago

I've been informed that if an RDF pattern does not match the OWL 2 Web Ontology Language Mapping to RDF Graphs, the RDF document is in OWL FULL. I would like to stay within OWL 2 DL semantics, so I will modify this PR to not step into that extended usage of owl:Axiom.

ajnelson-nist commented 2 years ago

I've updated the test, but I'm not sure if I placed one of the failure detectors right. An IRI-identified owl:Axiom bumps the graph into OWL 2 FULL. Should the closure raise an Exception on finding it is in OWL 2 FULL?

aucampia commented 2 years ago

I will try find some time this week to review this.