Comments about property paths

Dear All,

I have been trying some examples of SPARQL 1.1 property paths, and I
have gotten some results that seem to be counterintuitive. For
instance, consider a graph G:

:a :p :b
:b :p :c
:c :p :a

and the following query Q1:

SELECT * WHERE { :a (:p+) ?x }

According to the semantics proposed in the Working Draft document, the
result of the query Q1 over G is:

?x = :b, :c, :a

Now, consider a query Q2:

SELECT * WHERE { :a :p/(:p*) ?x }

According to the semantics proposed in the Working Draft document, the
result of the query Q2 over G is:

?x = :b, :c, :a, :b

I tested both queries in ARQ, getting the same results shown above.
The paths used in the queries are equivalent regular expressions (the
regular languages represented by (:p+) and :p/(:p*) are the same), so
the results of these queries over G should be the same. Am I missing
something?

I also executed in ARQ a third query Q3 containing a regular
expression that is equivalent to (:p+) and :p/(:p*):

SELECT * WHERE { :a (:p+)+ ?x }

But this time I got the result:

?x = :b, :c, :a, :b, :c, :a, :b, :c, :a, :b, :c, :a, :b, :c, :a

What should be the interpretation of this result? I would really
appreciate it if you could let me know whether I am missing something.
Thank you very much.

With best regards,

Sebastián Conca

Received on Monday, 21 March 2011 08:22:02 UTC