I am running a property path query as such on Python:
import owlready2 as or2
list(or2.default_world.sparql(
f"""
SELECT DISTINCT ?b
WHERE{
?b <http://www.w3.org/2000/01/rdf-schema#subClassOf> a.
FILTER NOT EXISTS {?c <http://www.w3.org/2000/01/rdf-schema#subClassOf> ?b}
}
"""
))
For certain node "a" (not all), this code makes the kernel restart. It cannot have to do with the number of subclasses of node "a", because node with most subclass does not make the kernel restart. I tried the same query on GraphDB, I did not run into any issues. I would appreciate any kind of guidance why this could be happening.