Stardog rules

2 views
Skip to first unread message

Alvarocket

unread,
Apr 21, 2015, 3:04:03 AM4/21/15
to sta...@clarkparsia.com
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:
  1. 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

Evren Sirin

unread,
Apr 30, 2015, 12:42:31 PM4/30/15
to Stardog
This is a bug in Stardog reasoner. The URIs generated by the reasoner
for two different instances (son and daughter) get mixed up and as a
result no results are returned. We'll fix this in one of the upcoming
releases.

Best,
Evren
> --
> -- --
> You received this message because you are subscribed to the C&P "Stardog"
> group.
> To post to this group, send email to sta...@clarkparsia.com
> To unsubscribe from this group, send email to
> stardog+u...@clarkparsia.com
> For more options, visit this group at
> http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

rock...@gmail.com

unread,
May 5, 2015, 3:21:04 AM5/5/15
to sta...@clarkparsia.com
Thanks for the answer.

Kind regards, 

Alvarocket.
Reply all
Reply to author
Forward
0 new messages