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?!