W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > October to December 2009

RE: Alternative Syntaxes for BGPs

From: Seaborne, Andy <andy.seaborne@hp.com>
Date: Thu, 29 Oct 2009 22:12:48 +0000
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>, SPARQL Working Group <public-rdf-dawg@w3.org>
Message-ID: <B6CF1054FDC8B845BF93A6645D19BEA3694058EC19@GVW1118EXC.americas.hpqcorp.net>

> -----Original Message-----
> From: public-rdf-dawg-request@w3.org [mailto:public-rdf-dawg-request@w3.org]
> On Behalf Of Birte Glimm
> Sent: 29 October 2009 18:48
> To: SPARQL Working Group
> Subject: Alternative Syntaxes for BGPs
> Hi all,
> this is mainly motivated from entailment regimes, but might be of
> interest to others, so I didn't prefix the subject of the email.
> I would like to suggest alternative syntaxes for BGPs

We already have a time-permitting feature on query language syntax.

> because in
> particular for OWL with Direct Semantics triple syntax can be very
> long and not very intuitive. E.g.,
> SELECT ?p WHERE { ?p a _:x . _:x a owl:restriction . _:x
> owl:onProperty :hasChild . _:x owl:SomeValuesFrom :Male . }
> asks for things that have a male child. In OWL Functional-Style Syntax
> (used throughout the OWL 2 spec) that would be
> SELECT ?p WHERE { ClassAssertion(ObjectSomeValuesFrom(:hasChild :Male) ?p) .
> }
> That is not much shorter, but probably more intuitive for OWL folks.
> Each such BGP can directly be translated into triples and for
> functional-style syntax, for example, a mapping to triples is part of
> the OWL 2 spec.
> Now there are at least two possibilities. One could allow SPARQL
> queries with BGPs in non-triple syntax (no mandatory support from
> SPARQL systems) 

This raises some questions: 

1/ Can the syntaxes be mixed in the same query? The same BGP?
2/ If they are different syntaxes, how does a processor know which syntax a request is using?
3/ Does it apply to RDFS? RIF? The keyword vocabulary is OWL-specific.
4/ Does this apply to SPARQL/Update as well as it shares pattern matching with SPARQL/Query?

> and another one is that SPARQL BGPs are always
> triples, but query interfaces could support different BGP syntaxes and
> translate them to triples before issuing the query.

Viewing this as one possible DSL on top of SPARQL, and so should be handled by the tools is, I think, the best place for it and it can be developed outside the WG by various communities.  There might well be different syntaxes for different tools clusters (e.g. rules).

It also means that tools can allow alternative syntaxes and still work against a SPQRQL endpoint that does not offer the syntax.
It removes it from the need to work on the SPARQL grammar used in the specifications which is already shared amongst different documents.  It removes the need to provide mechanisms for declaring what syntax a request is in at the protocol level if there isn't a single combined grammar.

We are already time poor.

> In any case, how does the group feel about adding a section about
> alternative syntaxes to the entailment regimes document?

I believe that the entailment regimes document should be focused on entailment and that alternative syntaxes is orthogonal to that.


> Cheers,
> Birte
> --
> Dr. Birte Glimm, Room 306
> Computing Laboratory
> Parks Road
> Oxford
> OX1 3QD
> United Kingdom
> +44 (0)1865 283529

Received on Thursday, 29 October 2009 22:13:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:00:57 UTC