Re: BNF expression of RDF Concepts

On 05/12/2013 10:28, Eric Prud'hommeaux wrote:
> * Richard Light <richard@light.demon.co.uk> [2013-12-05 09:43+0000]
>> I notice that the 1.1 CR [1] lacks a BNF representation of the concepts which characterize an RDF graph.  I suggest that providing such a formal representation would be helpful to systems developers, since it would introduce standard naming conventions, and structures, which could be followed in whichever programming language was being used for development.  This inter-system consistency would, in turn, help application software engineers using the systems they create.
> This is not an official RDF WG response. I'm just trying to accelerate
> us towards understanding your request.
>
> Do you have something in mind like
>
>    Dataset: DefaultGraph NamedGraph*
>    DefaultGraph: Graph
>    NamedGraph: GraphLabel Graph
>    GraphLabel: NonLiteral
>    Graph: Triple*
>    Triple: S P O
>    S: NonLiteral
>    P: IRI
>    O: Literal | NonLiteral
>    NonLiteral: IRI | BNode
>    Literal: LangTagged | NonLangTagged
>    NonLangTagged: LexicalForm DatatypeIRI
>    LangTagged: LexicalForm DatatypeIRI LangTag # |DatatypeIRI=xs:string
>    DatatypeIRI: IRI
>    IRI: per <http://www.w3.org/TR/rdf11-concepts/#dfn-iri>
>    BNode: per <http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node>
>    LexicalForm: per <http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form>
>    LangTag: per <http://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string>
Yes, that's the sort of thing:

   Dataset ::= DefaultGraph NamedGraph*
   DefaultGraph ::= Graph
   NamedGraph ::= GraphLabel Graph
   GraphLabel ::= NonLiteral
   Graph ::= Triple*
   Triple ::= S P O
   S ::= NonLiteral
   P ::= IRI
   O ::= Literal | NonLiteral
   NonLiteral ::= IRI | BNode
   Literal ::= LangTagged | NonLangTagged
   NonLangTagged ::= LexicalForm DatatypeIRI
   LangTagged ::= LexicalForm DatatypeIRI LangTag # | DatatypeIRI=xs:string
   DatatypeIRI ::= IRI
   IRI ::= per <http://www.w3.org/TR/rdf11-concepts/#dfn-iri>
   BNode ::= per <http://www.w3.org/TR/rdf11-concepts/#dfn-blank-node>
   LexicalForm ::= per <http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form>
   LangTag ::= per <http://www.w3.org/TR/rdf11-concepts/#dfn-language-tagged-string>


This would have to be relatively abstract, in that the Concepts 
recommendation isn't specifying a serialization format, like Turtle.

> Is there a publication which you feel optimally presents the abstract
> syntax for RDF?
My view is that it belongs in the Concepts document.

> The above introduces extra labels for use in other
> docs to reference (e.g. to impose further constraints on) NonLiteral
> and NonLangTaged. Do you consider this desirable?
If it means that these concepts are more precisely defined, I would 
definitely see that as a good thing.

> Given the timing, it may not be possible to include this at all, or to
> include this in a normative section. Will you accept either of those
> outcomes?
Yes.  I realise that I have come to this discussion at a point where you 
are about to finalise this document. Also, I am interested to hear 
whether there is wider support for this idea from within the developer 
community, but do not take it for granted that such support exists.

Richard

>
>
>> Richard
>>
>> [1]http://www.w3.org/TR/rdf11-concepts/
>>
>> -- 
>> *Richard Light*

-- 
*Richard Light*

Received on Thursday, 5 December 2013 11:25:27 UTC