zazuko / rdf-validate-shacl

Validate RDF data purely in JavaScript. An implementation of the W3C SHACL specification on top of the RDFJS stack.
MIT License
98 stars 13 forks source link

Infinite loop with cyclic rdfs:subclassOf relationships #43

Open martinmaillard opened 3 years ago

mhusm commented 1 year ago

I did some digging into my problem. I used a data set that that used owl:equivalentClass and a reasoner to generate triples from that. If we define

ex:A owl:equivalentClass ex:B

An OWL reasoner will derive that

ex:B rdfs:subClassOf ex:A.
ex:A rdfs:subClassOf ex:B.

So cyclic subclasses are bound to occur as soon as one has a data set with owl:equivalentClass