We are experiencing some unexpected behavior when running Stardog's reasoner with rules.
Consider the following two rules:
[
rdf:type <tag:stardog:api:rule:SPARQLRule> ;
<tag:stardog:api:rule:content> """
IF {
?parent :hasDaughter ?name .
BIND(UUID() AS ?daughter) .
}
THEN {
?daughter :daughterName ?name .
}""" ;
].
[
rdf:type <tag:stardog:api:rule:SPARQLRule> ;
<tag:stardog:api:rule:content> """
IF {
?parent :hasSon ?name .
BIND(UUID() AS ?son) .
}
THEN {
?son :sonName ?name .
}""" ;
].
When posing the following SPARQL query we obtain the expected results.
SELECT ?x ?y
WHERE {
?x :sonName ?y .
}
When the WHERE clause is changed to ?x :daughterName ?y, sound results are obtained as well.
Now, if the query involves *both* heads of rules, as below, the answers are empty.
select ?x ?y ?u ?v
where{
?x :sonName ?y .
?u :daughterName ?v .
}
Any idea why this is so?
The Stardog manual states that:
The URIs for the generated individuals are meaningless in the sense that they should not be used in further queries; that is to say, these URIs are not guaranteed by Stardog to be stable.
Could be the case that this remark applies to the rules and queries above?
Thanks in advance!
Alvarocket