Re: Action 369 -- Look at property path tests

On 25/01/11 14:41, Matthew Perry wrote:
> For pp16 and pp25, these paths repeat a node (i.e. contain a cycle). I
> thought we were using a node marking algorithm to prevent cycles.

We currently have a triple marking algorithm which puts in the end node 
which means you can get a duplicate from a cycle.

We could change ArbitraryLengthPath to also record node passed through.

For me, a consistent view is more important.  Also, with cycles

Data: (DAG, not cycle).

:a :p :b .
:b :p :z .

:a :p :c .
:c :p :z .


{ :a :p/:p ?X }
{ :a :p ?v .?v :p ?X } # SPARQL 1.0

have the endpoint twice.

{ :a :p* ?X } has :z twice.

{ :a :p/:p ?X }

Data: cycle:

:a :q :b .
:b :q :c .
:c :q :a .

and { :a :q+ ?X }
does not have a duplicate but :q* does because it includes the starting 
point and :q* = :q{0} UNION :q+

 > 2) pp16 -- I don't understand why the path d --> e --> f --> e is 

pp16 is a bit unnatural if read with interpretation of the meaning of 
the property: find me everyone ?X knows, recursively is "+", not "*"

Data contains:

:d foaf:knows :e .
:e foaf:knows :f .
:f foaf:knows :e .

{ ?X foaf:knows* ?Y } =
    { ?X foaf:knows{0} ?Y } UNION { ?X foaf:knows+ ?Y }

{ ?X foaf:knows{0} ?Y } ==> ?X=:d, ?Y=:d
{ ?X foaf:knows+ ?Y }   ==> ?X=:d, ?Y = :e, ?f then :e again as
the triple ":f foaf:knows :e" is travered, the endpoint included and the 
cycle stops.

Any loop where ArbitraryLengthPath is not starting in the cycle is going 
to give a duplicate and it differenates from the same without the final 
step (no cycle).

 > 3) pp25 -- I don't understand why the path a --> c --> c is included.

:a :p :c .
:c :p :c .

so :c goes to :c (a cycle of one triple).


Received on Tuesday, 25 January 2011 17:03:25 UTC