RE: Grammar for DAWG query language

-------- Original Message --------
> From: Steve Harris <>
> Date: 24 September 2004 12:02
> 
> On Fri, Sep 24, 2004 at 11:43:19 +0100, Dave Beckett wrote:
> > I think I guess this is time to propose an alternative since the
> > abutting of SOURCE ?src near a triple isn't working as far as
clarity
> > goes.  This is because that in
> >    SOURCE ?src (?x ?y ?z)
> > users are unsure if SOURCE ?src is part of the () following or
> > previous.  One simple approach is to move the term in the triple:
> > 
> >    (?x ?y ?z SOURCE ?src)
> 
> I quite like that form, its clear what SOURCE refers too.

At the F2F we discussed whether SOURCE applied to a statement or to
graph pattern.  We have to support having statement level source but I'd
prefer not to have a syntax that is statement-only but to have a syntax
that allows extension to graph patterns (c.f. log:includes so this is an
implemented style).

To me:
SOURCE ?src (?x ?y ?z)
SOURCE ?src (?a ?b ?c)

is the same as:
SOURCE ?src { (?x ?y ?z) (?a ?b ?c) }     // Grouping delimiters to
taste

but the latter can be clearer to the application writer especially as
the number of statements grows.  Different people think of things in
different ways - if the app writer wants to write out each SOURCE
statement, then fine.  But that is not the same as having that as the
only way.

Elsewhere (optionals) we have to have blocks (groups of statements).  My
preference is a syntax that has a single grouping construct (and a
single triple pattern would just be a group of one - and would not need
any group delimiters for simplicity of writing queries).

We then have operators that compose blocks : SOURCE, OPTIONAL being what
we have so far.  UNSAID and disjunction also can apply to blocks.

	Andy

> 
> >     which could be used like
> >        (?x ?y ?z)->foo:bar(1)
> > 
> >     where 'source' is a standard name.
> 
> This uses a bit too much line-noise for my tastes.
> 
> - Steve

Received on Monday, 27 September 2004 14:18:51 UTC