Closed nschejtman closed 1 year ago
Consider the simplest of ontologies with two individuals A and B
@prefix : <http://test#> . @prefix owl: <http://www.w3.org/2002/07/owl#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @base <http://test#> . :A rdf:type owl:NamedIndividual . :B rdf:type owl:NamedIndividual .
Writing the inferred models leads to:
:A a owl:Thing , owl:NamedIndividual ; owl:differentFrom :B , :A ; owl:sameAs :A .
As you can see A is different from A and the same as A, which is a contradiction. The same happens with B
The code to reproduce this is (Scala):
val data = ModelFactory.createDefaultModel() OpenlletOptions.USE_UNIQUE_NAME_ASSUMPTION = true data.read("src/test/resources/two-individuals/data.ttl", "TTL") val reasoner = PelletReasonerFactory.theInstance().create() val infModel = ModelFactory.createInfModel(reasoner, data) infModel.write(new FileWriter("src/test/resources/two-individuals/data.inferred.ttl"), "TTL")
Thank for this very nice report. I just pushed a fix for this on the 'test' branch.
Consider the simplest of ontologies with two individuals A and B
Writing the inferred models leads to:
As you can see A is different from A and the same as A, which is a contradiction. The same happens with B
The code to reproduce this is (Scala):