W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > January to March 2011

Re: [PP] Duplicates with :p*

From: Matthew Perry <matthew.perry@oracle.com>
Date: Thu, 10 Feb 2011 13:55:33 -0500
Message-ID: <4D5434A5.6090708@oracle.com>
To: Lee Feigenbaum <lee@thefigtrees.net>
CC: Andy Seaborne <andy.seaborne@epimorphics.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
Hi Andy,

What about the other issue of node marking vs edge marking for paths like
a-->b-->c-->c

assuming data
:a :p :b .
:b :p :c .
:c :p :c .

and query
{ :a :p+ ?x }

node marking gives
?x = :b :c

edge marking gives
?x = :b :c :c

Thanks,
Matt

On 2/10/2011 11:33 AM, Lee Feigenbaum wrote:
> On 2/10/2011 11:08 AM, Andy Seaborne wrote:
>> Summary:
>>
>> 1/ Proposal to have an explicit :p* operator
>> instead of :p* = :p{0} UNION :p+
>>
>> 2/ path-* would return only one node for a possible path
>> That does not path-* duplicate free if there are
>> multiple ways to the same end.
>
> Read as:
>
> That does not make path-* duplicate free if there are multiple ways to the same endpoint.
>
> (thanks to Andy on IRC for the clarification.)
>
> Lee
>
>> c.f. literals and aggregation example
>> c.f. BGPs and projection.
>>
>> Details still to be worked on.
>>
>>
>> Currently,
>>
>> :p* = :p{0} UNION :p+
>>
>> This is a source of duplicates because :p{0} may include a node and then
>> :p+ will also include it if the path loops back to the start.
>>
>> Defining
>> :p+ = :p/:p*
>>
>> would also lead to duplicates because of the hidden projection in the
>> "/" so two operators are needed.
>>
>> Example 1:
>>
>> :a :p :b .
>> :b :p :c .
>> :c :p :a .
>>
>> which is:
>>
>> :c
>> / \
>> / \
>> :a --> :b
>>
>> Paths:
>> P1) :a :p* ?X
>> P2) :a :p+ ?Y
>>
>> we want:
>> P1) => ?X = :a :b :c
>> P2) => ?Y = :a :b :c
>>
>> Example 2:
>>
>> :a :p :b .
>> :b :p :c .
>> :c :p :b .
>>
>> :c
>> / \
>> \ /
>> :a --> :b
>>
>> we want
>> P1) => ?X = :a :b :c
>> P2) => ?Y = :b :c
>>
>>
>> It should be possible to have the same algorithm, with different
>> starting conditions, for :p+ and :p*.
>>
>> Andy
>>
>>
>
Received on Thursday, 10 February 2011 18:56:36 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:45 GMT