Hi,
I think I'll just go with the default graph.
When it comes to choosing which graph to add the inferred graph to, you're right, it would be hard to decide. Although RDFS has the nice property that for any given triple in the Abox, no other triples in the Abox are required for a complete inference. It's only when you allow things like transitive properties that you run into trouble. For the Tbox, it would obviously be difficult to derive Tbox triples if it's in multiple graphs.
I have a technical question though. I've got all the tests passing. But I want to implement a feature that allows you to load the ontology into the reasoner sail beforehand, doing all the Tbox forward chaining, and then reusing that for instantiating single forwardchaining sails and reusing the initial reasoning to save time. Essentially, it's common to have a single ontology, that you know up front, and needing to reason over multiple Aboxes based on that ontology. So reuse would save a lot of time.
For this I was wondering if there is some kind of dummy NotifyingSail I can use? Since I can't instantiate a MemoryStore without creating a maven dependency on the sail module. Cheers, Håvard As you mentioned in your other mail, this is caused by the fact that your reasoner adds your inferred statements into the same named graph as the explicit statements from which they are derived. I don’t think the test was intended to cope with that, since all of RDF4J’s own reasoners add inferred statements to the default graph instead.
Obviously if you choose to implement your reasoner to add inferred triples to named graphs, that’s fine (although there are some drawbacks to this approach, like how to handle statements from multiple named graphs). It just means this particular test is not applicable to your implementation. You can either ignore it, or perhaps override it to implement in a way that makes sense for your reasoner.
Cheers,
Jeen
I'm still working on this, I realized that modifying the tests was going to be too much work, so I've modified my reasoner instead to work with the tests. So now you can choose to either load the TBox up front, and maximise the reasoning speed, or load the TBox as you go and sacrifice some reasoning speed (from O(n) to O(n+2n), which is still fairly fast).
However, I've run into an unexpected result in the test
testCon.add(vf.createIRI("urn:test:s2"), vf.createIRI(URN_TEST_P2), vf.createIRI("urn:test:o2"), graph); in public void testQueryDefaultGraph() It adds <urn:test:s2> <urn:test:p2> <urn:test:o2> From which I use rdfs4a and rdfs4b to infer: <urn:test:s2> rdf:type rdfs:Resource. <urn:test:o2> rdf:type rdfs:Resource.
This fails the test, because it only expects there to be 1 statement in the graph, while there are now 3. What is the expected behaviour?
Cheers, Håvard
_______________________________________________ rdf4j-dev mailing list rdf4j-dev@xxxxxxxxxxxTo change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/rdf4j-dev
|