RE: [ACTION-18] use case on !ASK in FILTERS to emulate negation



> -----Original Message-----
> From: Ivan Mikhailov [mailto:imikhailov@openlinksw.com]
> Sent: 24 May 2009 21:05
> To: Seaborne, Andy
> Cc: Axel Polleres; public-rdf-dawg@w3.org
> Subject: RE: [ACTION-18] use case on !ASK in FILTERS to emulate negation
> 
> > WHERE { ?x foaf:givenName  ?name .
> >         !EXISTS { ?x dc:date ?date }
> >       }
> 
> Maybe '!' should get 'NOT' synonym, for readability?

Yes.  I've updated 

http://www.w3.org/2009/sparql/wiki/Design:Negation


with some EXISTS / NOT EXISTs examples and included the grammar changes.  I propose that we use NOT EXISTS rather than UNSAID but that's my personal style preference. I like the use of the same words as in FILTER (because NOT EXISTs used outside FILTER is still a filter, just one that does not move around).

The design page has both MINUS and EXISTs designs on it.

Simon/Eric - you gave do you have examples where either MINUS or EXISTS can not easily be used where EXISTS or MINUS can?

The distinguishing example is helpful - seem to me that MINUS needs a slightly artificial form to introduce ?name to be set-compatible with the preceding pattern.  But is this an artefact of the example and is there a counter example of EXISTs having to be slightly artificial?

http://www.w3.org/2009/sparql/wiki/index.php?title=Design:Negation#Distinguish_MINUS_from_UNSAID


> In addition, I still think that EXISTS without FILTER around are a bit
> confusing, esp. if the next clause is OPTIONAL {...}.

I'm tending to both forms although underneath raw EXISTs because I thing using iut on its own is going to be common.  Internally, it behaves just like a FILTER which is not moved to the end of a BGP.

> 
> Best Regards,
> 
> Ivan.

 Andy

Received on Monday, 25 May 2009 17:49:30 UTC