Re: First steps on SPARQL Update formal model

On 30/08/10 17:33, Alexandre Passant wrote:
> Hi all,
>
> I've committed first steps of the SPARQL Update formal model in CVS.
> It's available at http://www.w3.org/2009/sparql/docs/update-1.1/Overview.xml#sec_formalmodel for comments.
>
> So far it covers only the general definitions (GraphStore, GraphStoreState and UpdateOperation) and operations dealing with graph management (CreateOperation and DropOperation).
> Before going further, I'd like to get comments / feedback of the group, especially Andy + Steve to be sure it fits with definition of SPARQL Query, and Chimezie re. definitions in the Update document - while I checked both when doing that formal model, but feedback is welcome.
>
> Best
>
> Alex.
>

Hi Alex,

Makes sense to me.

[[
Definition: GraphStore

A GraphStore GS is a mutable container of RDF graphs.
It has one unnamed (default) slot and zero or more named slots 
identified by an IRI <i>.
Each slot holds an RDF graph.

GS = (<DG>, {(<i>, <G_i>)})
]]

Typographical: (don't want <> around - it's not an IRI)
<DG>  ==> DG
<G_i> ==> G_i

[[
Definition: CreateOperation

A CreateOperation OpC is an UpdateOperation in which (1) a new named 
slot <j> and (2) a new graph are created in the GraphStore. The new 
graph is held in the new slot. Other slots and graphs are not affected.

OpC(GSS(GS, t)) = (S(DG, t), {(<i>, S(G_i, t)}, (<j>, S(G_j, t+1))
]]

I think OpC needs to take some argument so we can talk about them on the 
RHS.  (As an side-effect or writing like that, I don't think the t is 
needed at all but I've left them in below)

Something like:

OpC(<IRI>, silent, (S(DG, t+1), {(<i>, S(G_i, t+1)})) =

   if <IRI> is one of <i> for some <i> in GS
     if !silent then error else ;
   if <IRI> is not one of <i> for any <i> in GS
     (S(DG, t), {<i>, (G_i, t)} union {(<IRI>, {}, t+1))

that is, union a new pair into the named graph state of the graph store 
(this is the non-error, non-silent case).

It'll have to OpCreate, not OpC as we have OpClear as well.

For OpDrop:

OpD(<IRI>, silent, (S(DG, t+1), {(<i>, S(G_i, t+1)})) = ...

OpD(DEFAULT, silent, (S(DG, t+1), NG) = (S({}, t+1), NG)

OpD(NAMED, silent, (S(DG, t+1), {(<i>, S(G_i, t+1)})) = S(DG, t, {})

OpD(ALL, silent, GS) =
   OpD(DEFAULT, silent, OpD(NAMED, silent, GS))
or just
  (S({},t+1), {})

Writing GSS out as it's definition on the LHS, gives the names for the 
RHS as well.

--------------------
 From this:

Do we want SILENT on

DROP NAMED / DROP ALL / DROP DEFAULT
CLEAR NAMED / CLEAR ALL / CLEAR DEFAULT

I think could move the SILENT to only apply for GRAPH <iri>

At the moment, the grammar has:

Clear	:= <CLEAR> ( <SILENT> )? GraphRefAll
Drop	:= <DROP> ( <SILENT> )? GraphRefAll
GraphRefAll :=	( GraphRef | <DFT> | <NAMED> | <ALL> )?

Welcome to wonders of typesetting definitions in HTML.

	Andy

Received on Monday, 30 August 2010 21:08:37 UTC