- From: Alexandre Bertails <alexandre@bertails.org>
- Date: Mon, 28 Jul 2014 15:51:30 -0400
- To: Sandro Hawke <sandro@w3.org>
- Cc: Pierre-Antoine Champin <pierre-antoine.champin@liris.cnrs.fr>, ashok malhotra <ashok.malhotra@oracle.com>, Andrei Sambra <andrei.sambra@gmail.com>, "public-ldp-wg@w3.org" <public-ldp-wg@w3.org>
On Mon, Jul 28, 2014 at 3:01 PM, Sandro Hawke <sandro@w3.org> wrote: > On 07/28/2014 04:52 AM, Pierre-Antoine Champin wrote: > > - Paths could not be simplified without losing expressivity, I think. > Sincerely, I find then significantly simpler than BGPs, so if people find > them complicated, I tend to think that it is due to the way we described > them more than to the syntax itself. > > > Let me expand on a previous point elsewhere. I think it would help the > path syntax were more obvious and didn't feel like some new bit of design. > > Hm. Looking at your example, you're using schema:attendee backwards. That > was probably one more thing that confused me in looking at the path example. > It's { event attendee person } and you're using it as { person attendee > event }. I'll call it attendeeOf for now. > > I find the path example: > > Bind ?event <#> /schema:attendeeOf[/schema:url = > <http://conferences.ted.com/TED2009/>] . > > maybe more confusing than the BGP: > > <#> schema:attendeeOf ?x. > ?x schema:url <http://conferences.ted.com/TED2009/>. > > But as I think about it, I'm wondering about just using Turtle (extended > with ^ for inverse arcs, which ALMOST made it into Turtle, but is in > SPARQL). Something like: > > BIND ?event [ ^schema:attendeeOf <#>; schema:url > <http://conferences.ted.com/TED2009/> ] > > Semantics are you parse it as Turtle [extended with ^] to get a rooted > graph, then do a graph match, which must be unitary. > > Basically, the "path expression" now it looks like the bit of turtle that > would have been used to create the blank node you're trying to match, with > the added inverse arcs if you happen to know them. I know I don't care that much re: syntax, but I have no idea what you are trying to achieve with that alternative one. Can you be more specific when you say it confuses you? You think it's not well defined? Using '^' instead of '-' is actually something Pierre-Antoine and I already discussed, because it is the same meaning as in SPARQL. As I said last week, this one is definitely not an issue for us, but I would prefer that we focus on the general approach. The syntax for Path was directly taken by Pierre-Antoine's, I just made it look like an algebra. In particular, n/(p1/p2) === (n/p1)/p2. There is no need to define the '/' operator that way in LD Patch, but that's the intuition behind it. And that's also where it differs from SPARQL's '/'. As for the constraints, I didn't want to change the syntax to make the higher order function explicit, that would be overkill for a path, for the closure is implicit but exists in the semantics. But the intuition is that n/p1[p2=v] is equivalent to (n/p1).filter(node => node/p2 is v). Finally, I don't understand what would be the equivalent of the following path in your proposal: Bind ?event <#> /schema:attendeeOf[/schema:url = <http://conferences.ted.com/TED2009/>]!/ex:foo[/ex:bar] . Alexandre > > -- Sandro > >
Received on Monday, 28 July 2014 19:51:58 UTC