Re: ISSUE-100: Should ld-patch use a slash like sparql does, instead of as it currently does?

On Mon, Aug 18, 2014 at 4:11 PM, Andy Seaborne <andy@apache.org> wrote:
> On 18/08/14 20:49, Alexandre Bertails wrote:
>>
>> On Mon, Aug 18, 2014 at 3:38 PM, Andy Seaborne <andy@apache.org> wrote:
>>>
>>> On 18/08/14 17:55, Sandro Hawke wrote:
>>>>
>>>>
>>>> On 08/18/2014 09:30 AM, Alexandre Bertails wrote:
>>>>>
>>>>>
>>>>> On Mon, Aug 18, 2014 at 12:00 PM, Sandro Hawke <sandro@w3.org> wrote:
>>>>>>
>>>>>>
>>>>>> On 08/18/2014 08:17 AM, Alexandre Bertails wrote:
>>>
>>>
>>>
>>>>> The intuition is that when you see `node(s) / p1 / p2`, it means that
>>>>> you start with the current nodes and try to follow p1, this gives you
>>>>> a new set of nodes, on which you can now apply p2.
>>>>
>>>>
>>>>
>>>> Same with SPP.
>>>
>>>
>>>
>>> Absolutely.
>>>
>>> { ?x :p1/:p2 ?y }
>>>
>>> ?x can be a collection of nodes.
>>>
>>> Do you have a concrete example of where there are differences?
>>
>>
>> I think there is some misunderstanding.
>>
>> In `Bind ?foo ?x /:p1/:p2 .`, ?x is replaced by its previously bound
>> value. It is never left unknown and start with a concrete value. The
>> operation carries a set of nodes, the final value being here bound to
>> ?foo. No need for a solution mapping.
>
>
> I didn't mention solution mappings.

I do mention them, because the operational semantics are not the same.

> My point is that in SPARQL path starts from a collection of nodes like LD
> Patch path so the intuition you mention is the same.

The path _starts_ from a collection of nodes? Or does it introduce a
"possible route through a graph between two graph nodes" ?

> Do you have a concrete example of where there are differences?

Bind ?foo ?x / :p1 / :p2 [ / :p3 / :p4 = "bar" ] / :p5 .

This will be denoted in SPARQL by the following:

?x :p1/:p2 ?y .
?y :p3/:p4 "bar" .
?y :p5 ?foo .

If ?x is known beforehand and if the constraints are resolved in that
order, then yes, this is equivalent module the path being split.

I have explained the rationale several times. If people really want to
see SPARQL there, that's fine, really. People are free to compile
their LD Patch to SPARQL if they want to, but they have to be aware of
how the SPARQL engine will execute their query, mainly the order of
the clauses.

At this point, I think there has been enough arguments on both "sides"
for people to vote on their preference.

Alexandre

>
>         Andy
>
>
>>
>>>
>>> The charter has a "Liaison" which includes SPARQL WG (tricky as it
>>> formally
>>> does not exist) - why not start by sending a message the SPARQL comments
>>> list?
>>
>>
>> I am not sure what we would ask to the SPARQL WG. The LD Patch
>> semantics don't share much with SPARQL.
>
>
> The path syntax overlaps.
>
>
>>
>> Alexandre
>>
>>>
>>>          Andy
>>>
>>>
>>>>> Then you may object that this seems to not work anymore when used in
>>>>> constraints eg. `node(s) / p1 / p2 [ / p3 ]`. Actually, the set of
>>>>> nodes when in a constraint is there *implicitly*, a constraint being
>>>>> exactly like a higher-order function, whose argument is the set of
>>>>> nodes before getting into the constraint.
>>>>
>>>>
>>>>
>>>> I'm not concerned with constraints for the purposes of issue-100.
>>>>
>>>>> / is used consistently in the whole path, including its semantics.
>>>>
>>>>
>>>>
>>>> I'm not saying it's internally inconsistent, just that it's gratuitously
>>>> different from SPP, as far as I can tell.
>>>>
>>>> I think it's very important that we borrow whichever bits of SPP work
>>>> reasonably well for LD-Patch.
>>>>
>>>>> Now again, same argument as last email, changing that would be a -0.9
>>>>> for me.
>>>>>
>>>>>> The semantics are (arguably) the same; the syntax is extremely
>>>>>> similar,
>>>>>> differing only in the leading slash.
>>>>>>
>>>>>> To me that difference is a show-stopper.  That's ISSUE-100.
>>>>>
>>>>>
>>>>> A show-stopper? As in -1 or -0.9 ?
>>>>
>>>>
>>>>
>>>> I'm not going to -1 any design decisions here, but I think it's critical
>>>> to answer the questions I raise above.  I'm entirely confident we'll
>>>> have to answer them later with this design, and at that point it'll be
>>>> much harder.
>>>>
>>>>          - s
>>>>
>>>>> Alexandre
>>>>>
>>>>>>         -- Sandro
>>>>>>
>>>>>>
>>>>>>
>>>>>>> But unlike SPARQL, LD path expressions can be nested, and include
>>>>>>> constraints. SPARQL does that with FILTER and new constraints in the
>>>>>>> BGP. The grouping in SPARQL (using parenthesis) is very different
>>>>>>> from
>>>>>>> the constraints (square brackets and exclamation mark).
>>>>>>>
>>>>>>> I think it's a bad idea to make them feel like they behave the same,
>>>>>>> which could be induced by the choice of the syntax.
>>>>>>>
>>>>>>> I don't want to stop the group with syntactical questions thought, so
>>>>>>> just a -0.9 for me.
>>>>>>>
>>>>>>> Alexandre
>>>>>>>
>>>>>>> [1]
>>>>>>>
>>>>>>>
>>>>>>> https://dvcs.w3.org/hg/ldpwg/raw-file/ldpatch/ldpatch.html#path-expression
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Aug 18, 2014 at 10:59 AM, Linked Data Platform  Working Group
>>>>>>> Issue Tracker <sysbot+tracker@w3.org> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> ISSUE-100: Should ld-patch use a slash like sparql does, instead of
>>>>>>>> as it
>>>>>>>> currently does?
>>>>>>>>
>>>>>>>> http://www.w3.org/2012/ldp/track/issues/100
>>>>>>>>
>>>>>>>> Raised by:
>>>>>>>> On product:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>
>>>>
>>>
>>>
>>
>
>

Received on Monday, 18 August 2014 20:39:14 UTC