- From: Jeremy Carroll <jjc@hpl.hp.com>
- Date: Tue, 13 Dec 2005 17:49:28 +0000
- To: Michael Kifer <kifer@cs.sunysb.edu>
- CC: "Evan K. Wallace" <ewallace@cme.nist.gov>, public-rif-wg@w3.org
Michael Kifer wrote: >> Attached is a slightly modified version of the SW compatibility breakout notes >> in PDF form. I added a key for the labels I used for the speakers. >> >> -Evan > > I have a Q regarding one of the remarks that Bijan made (according to the > notes). Posting here because there might be wider interest in this. > > There was a discussion of whether the query language (SPARQL) has negation > and Bijan said that the existentials get us there. > This is something that I don't understand. *Universal quantification* in a > query language introduces negation. But existential conjunctive queries > without explicit negation are Horn clauses and are within Datalog. > For those queries the classical equivalence of logical implication, least > fixpoint, and the unique min model holds. I am not sure if this bit of SPARQL is relevant. If not please ignore. From http://www.w3.org/TR/2005/WD-rdf-sparql-query-20051123/ [[ One may test that a graph pattern is not expressed by specifying an optional graph pattern that introduces a variable and testing to see that the variable is not bound. This is called Negation as Failure in logic programming. This query matches the people with a name but no expressed date: PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX dc: <http://purl.org/dc/elements/1.1/> SELECT ?name WHERE { ?x foaf:givenName ?name . OPTIONAL { ?x dc:date ?date } . FILTER (!bound(?date)) } Query result: name "Alice" ]] Jeremy
Received on Tuesday, 13 December 2005 17:50:24 UTC