W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > March 2015

Re: SHACL abstract syntax or functional specification

From: Arthur Ryman <arthur.ryman@gmail.com>
Date: Sun, 15 Mar 2015 15:53:03 -0400
Message-ID: <CAApBiOmx70M0uLCrSjOC3hrC6xss70CYdRda0qq3Vd26aC+4Ng@mail.gmail.com>
To: Jose Emilio Labra Gayo <jelabra@gmail.com>
Cc: "public-data-sh." <public-data-shapes-wg@w3.org>
Jose,

Sorry for the delayed response. Thanks for taking a stab at a
semantics document. I scanned your spec at
http://labra.github.io/Haws/shacl/

1. The spec says:

Schema ::= Label Shape * // Schema associates a Label with a Shape

You are using a some informal syntax. I assume a Schema is actually a
mapping that associates each Label in some set with some Shape. If so,
then should't the grammar be:

Schema ::= (Label Shape) *           // Schema associates a Label with a Shape

You'd also need a constraint that no Label is associated with more
than one Shape.

2. Your syntax does not make it apparent the difference between
terminal and non-terminal symbols. I assume Empty, And, Or, Arc,
InvArc are terminal symbols.

3. Your formal semantics is defined as interpreting a Schema as a
mapping from the nodes of a graph to types, where I believe you are
calling the Label's types? I don't think this is a very natural
semantics. It's more like XML post-schema validation. The natural
semantics is as constraints. Given a node in a graph and a shape, the
node either satisfies the shape or not.

4. The operation removeTriple(ts) does not match its description. Are
you missing an argument, i.e. removeTriple(t, ts)?

5. My preference is to use a real formal specification language that
can be machine-checked, e.g. Z, if you want to claim formality. Many
of the errors I identified would be caught immediately by a
type-checker like fuzz.

-- Arthur



On Mon, Mar 2, 2015 at 12:14 AM, Jose Emilio Labra Gayo
<jelabra@gmail.com> wrote:
> One of the already approved requirements is that SHACL should be a higher
> level language.
>
>
> To do that, my understanding is that we have to define an abstract syntax or
> functional specification which describes the main constructs of the
> language.
>
>
> Most language specifications are defined based on that abstract syntax. For
> example:
>
>
> RDF Abstract Syntax and concepts (http://www.w3.org/TR/rdf11-concepts/)
>
> SPARQL (http://www.w3.org/TR/sparql11-query/#sparqlDefinition)
>
> OWL (http://www.w3.org/TR/2012/REC-owl2-syntax-20121211/)
>
>
> I proposed an abstract syntax for SHACL here:
>
>
> http://labra.github.io/Haws/shacl/
>
>
> which is of course open to comments/feedback.
>
>
> There are multiple advantages of defining an abstract syntax for describing
> a language like separation of concerns, allowing the language designers to
> concentrate on the language concepts instead of syntactic details,
> identification of possible redundant constructs, etc.
>
>
> I also proposed that the Shacl spec should have a section about the abstract
> syntax.
>
>
> However, I found this answer from Holger:
>
>
> “I don't think any Abstract Syntax is needed or helpful. SHACL is already
> self-contained using SPARQL.”
>
>
> I start this as a separate thread to remark that this is for me a very
> important topic. I really don’t understand why having an abstract Syntax is
> not needed for Shacl or why it will be unhelpful.
>
>
> If the reason is that SHACL is self-contained using SPARQL, then my
> understanding is that we are not defining a higher level language at all.
>
>
> --
>
> -- Jose Labra
>
Received on Sunday, 15 March 2015 19:53:31 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:17 UTC