1

I configured a repository in graphDB with the ruleset OWL2-RL, such that I get the most powerful reasoning capability that graphDB supports in order to check how graphDB behaves when SPARQL updates affect implicit statements.

My first experiment with symmetric properties yields an inconsistent behaviour:

Assume the minimalistic TBox:

:Human a  owl:Class .

:friendOf a owl:SymmetricProperty;
rdfs:domain :Human;
rdfs:range :Human.

And one fact in my ABox:

:alice :friendOf :bob

A query like

select * where { ?a :friendOf ?b }

yields correctly the two triples:

:alice :friendOf :bob
:bob :friendOf :alice

where the first triple is the explicitly provided triple whereas the second is the implied statement thanks to graphDB's reasoning on the symmetric property :friendOf.

The reasoning also works fine when I delete the first triple :alice :friendOf :bob, i.e. it also deletes automatically the opposite statement :bob :friendOf :alice as expected due to the symmetry of :friendOf.

However, if I try to delete :bob :friendOf :alice at first (before deleting :alice :friendOf :bob) then nothing happens!

Based on this observation I suspect, that retracting statements only works correctly when beforehand explicitly given triples are retracted, but not when implied triples are removed. I wonder if this shouldn't be considered an inconsistency? And how it could be fixed?

May be, though, it is an intended behaviour that is inline with the retraction algorithm described in the graphDB documentation. It is difficult for me to check this. May be an graphDB developer can elaborate on this a bit?!

  • 1
    To simplify the matters, add operation adds explicit statements to the repository and compute the inferred closure, remove operation remove only explicit statements and recompute the closure so the dataset is consistent with respect to the ruleset. So when you try to remove a statament that has been derived, nothing happens since the explicit statement is still present and the inferred one stays in the closure. Hope that such description is somewhat more clear ... – Damyan Ognyanov Sep 03 '21 at 06:54
  • Ok the graphdb behaves as intended by design. But then I find the design problematic: As user you don't know which triple is explicit or inferred (unless you entered the triples yourself)! This is an issue in my opinion. If user A adds `:alice :friendOf :bob` and user B sees `:bob :friendOf :alice`, then user B does not know whether `:bob :friendOf :alice` is inferred or explicitly given. In fact user B should not care about. If B desides that `:bob :friendOf :alice` should be retracted then B should be able to just remove it without bothering from where it was inferred. – Immanuel Normann Sep 03 '21 at 08:07
  • @ImmanuelNormann If a statement can be *inferred* from other asserted statements, it doesn't make sense to retract it without doing at least one of retracting the other asserted statements or retracting the rule. For instance, from laws of arithmetic, I can *infer* that if x + y = z then z - y = x. I can't "retract" z - y = x without either retracting some of the rules/axioms or the claim that x + y = z. – Joshua Taylor Sep 08 '21 at 18:59
  • Let's accept that for graphdb it matters whether a statement is asserted or inferred when you aim to retract it. But then again: How could I figure out which is the case? I am not aware of a SPARQL query answering the question if a given statement is asserted or inferred. – Immanuel Normann Sep 16 '21 at 11:26
  • @JoshuaTaylor I am not sure whether an example from arithmetic can help the intuition for solving the issue at hand. Since mathematical theories in general are not considered dynamic in the sense that you add or retract axioms (e.g. you wouldn't "retract" say `x+0=x` from group theory at some point in time and add it again later on. I would say axioms in mathematical theories hold once and forever.) – Immanuel Normann Sep 16 '21 at 11:28
  • @ImmanuelNormann An OWL ontology *is* a mathematical theory, though. Hence statements being called "axioms" and that we *infer* things from them. Of course, many applications actually want a blackboard system, where things can be added and removed, but that's a different thing. There is, of course, a distinction between "OWL theory" and "what happens in an application", just like "you'd not retract x+0=x from group theory", you could still *erase* it from a sheet of paper. The OWL ontology and reasoning is more like "group theory"'; a concrete triple store is more like the sheet of paper. – Joshua Taylor Sep 16 '21 at 13:07
  • @JoshuaTaylor exactly this is the point I am interested in: "many applications actually want a blackboard system, where things can be added and removed"! And my general question is how adding and removing statements (not rules) should interact with inference in such applications. graphdb seems to distinguish asserted statements (the ones you added) and inferred (those "added" by inference of the machine). After adding asserted and inferred statements, though, there is IMHO no logical necessity to continue to treat them as different sort of statements. I am trying to grasp the rational behind. – Immanuel Normann Sep 16 '21 at 21:18

0 Answers0