gtfierro / reasonable

OWL 2 Reasoner built on DataFrog
BSD 3-Clause "New" or "Revised" License
67 stars 4 forks source link

owl:inverseOf not materialized. #22

Closed lu-pl closed 1 year ago

lu-pl commented 1 year ago

Sorry to bother you again, but I just did a very basic test and realized that reasonable apparently doesn't materialize owl:inverseOf inferences.

OS: Arch Linux Python: 3.11 reasonable: 0.2.2

import reasonable

from rdflib import Namespace, Graph
from rdflib.namespace import OWL

ex = Namespace("http://example.org/")

graph = Graph()
graph.add((ex.subj, ex.pred, ex.obj))
graph.add((ex.inverse, OWL.inverseOf, ex.pred))

r = reasonable.PyReasoner()
r.from_graph(graph)
entailed = r.reason()

print((ex.obj, ex.inverse, ex.subj) in entailed)   # False

Am I missing something or is this a problem with reasonable?

gtfierro commented 1 year ago

Looks like it is a bug in reasonable! Suprised we didn't run into that sooner. I've pushed a fix to reasonable==0.2.3 -- this should have the expected behavior.