W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2010

Re: exists

From: Axel Polleres <axel.polleres@deri.org>
Date: Wed, 26 May 2010 14:25:33 +0100
Cc: "Olivier Corby" <Olivier.Corby@sophia.inria.fr>, "SPARQL Working Group" <public-rdf-dawg@w3.org>
Message-Id: <02D3F3DB-1BDA-4E3D-82D9-FD6B5E91A3D6@deri.org>
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
We have at least two people agreeing and two potential test cases... not too bad anyways ;-)

On 26 May 2010, at 11:50, Birte Glimm wrote:

> Axel,
> I also tried you examples to test my understanding and I come to the
> same results that you have (not that this gives a guarantee the we get
> it right ;-) ).
> Birte
> 
> On 25 May 2010 13:37, Axel Polleres <axel.polleres@deri.org> wrote:
> > I would assume that existing bindings should prevail in an exists
> > pattern... i.e. before computing the filter, you replace all variables with all existing (non-null) bindings...
> > do you see any problem with that?
> >
> >
> > just thinking out loud... would that also work with unbounds from optionals?
> > seems not to be a problem... e.g.
> >
> > let't assume graph:
> >
> > g1:
> >  a p b
> >  a q p
> >
> > q1:
> >> select ?x ?y where {
> >> ?x p ?y OPTIONAL { ?y q ?z}
> >> filter( ! exists {?y q ?z })
> >
> >
> > would return {?x/a ?y/b}, whereas
> >
> > q2:
> >> select ?x ?y where {
> >> ?x p ?y OPTIONAL { ?y q ?z}
> >> filter( ! exists {?v q ?z FILTER(?y != ?v) })
> >
> > would return the empty solution set {}
> >
> > on graph
> >
> > g2:
> >  a p b
> >  b q p
> >
> > in reverse, q1 would return {} and q2 would return  {?x/a ?y/b}, yes?
> >
> > Axel
> >
> >
> >
> >
> > On 25 May 2010, at 12:44, Olivier Corby wrote:
> >
> >> What is the scope of variables in nested exists pattern?
> >> For example, is the inner ?x the same as the outer ?x
> >>
> >>
> >> select * where {
> >> ?x p ?y
> >> filter(! exists {?y q ?z
> >>                         filter(! exists {?x r ?z})
> >>                       })
> >>
> >> }
> >>
> >>
> >> Olivier
> >>
> >>
> >
> >
> >
> 
> 
> 
> --
> Dr. Birte Glimm, Room 306
> Computing Laboratory
> Parks Road
> Oxford
> OX1 3QD
> United Kingdom
> +44 (0)1865 283529
> 
Received on Wednesday, 26 May 2010 13:26:20 GMT

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