- From: Francis McCabe <frankmccabe@mac.com>
- Date: Thu, 25 Oct 2007 21:33:12 -0700
- To: public-rdf-dawg-comments@w3.org
I believe that is important that SPARQL have a declarative semantics.
This both reflects the fundamental purpose of a query language -- it
is not a programming language -- and will make it easier to
communicate to non-professionals the merits and benefits of using it.
In the case of a query language for RDF, this is doubly the case as
the base language is inherently declarative. (It even has a model
theory!)
It is therefore something of a disappointment to discover that SPARQL
does not have a truly declarative semantics. It is not possibly to
firmly state that the results of satisfying a SPARQL query are based
on some sound inference process backed up by a model theoretic
interpretation.
I believe that the OPTIONAL feature may be one of the causes of this.
Following a recent email conversation, I became aware that its
semantics do not fit well with the current model for the
quantification of variables. Certainly, the idea that a top-down
evaluation (or a left-to-right versus left-to-right) would give
different answers than a bottom-up evaluation is strong evidence of
the weakness of the semantic framework.
The specification hints at this, the query:
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)) }
is described as being equivalent to negation-as-failure. Giving NAF a
declarative semantics is a non-trivial task (first done by Keith
Clark). It involves assuming a 'completion semantics' for the
predicates: the definitions must be interpreted as if-and-only-if;
and furthermore, inequality of symbol must become inequality of
denoted individuals.
Both of these assumptions are antithetical to the nature of the
semantic web which depends on the so-called Open World assumption --
primarily because information on the SW can never be assumed to be
complete.
Although there may appear to be compelling pragmatic reasons for
retaining the OPTIONAL feature; I believe that they are outweighed by
the conflicts that they raise with the fundamental nature of the
Semantic Web.
Thank you for your attention
Frank McCabe
Received on Friday, 26 October 2007 04:33:51 UTC