Re: shapes-ISSUE-86 (dimitris): Associating shapes with ontologies or vocabularies [SHACL Spec]

"Peter F. Patel-Schneider" <pfpschneider@gmail.com> wrote on 10/01/2015 
03:37:14 AM:

> From: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
> To: "Eric Prud'hommeaux" <eric@w3.org>
> Cc: public-data-shapes-wg <public-data-shapes-wg@w3.org>
> Date: 10/01/2015 03:38 AM
> Subject: Re: shapes-ISSUE-86 (dimitris): Associating shapes with 
> ontologies or  vocabularies [SHACL Spec]
> 
> On 10/01/2015 12:12 AM, Eric Prud'hommeaux wrote:
> 
> [...]
> 
>  on determining whether a node in a
> >> data graph is a SHACL instance of a class.
> > 
> > I'd this a term of art to express that an RDF node confirms to a 
shape?
> 
> [...]
> 
> Not at all.
> 
> When validating shapes or determining their scope, it is sometimes 
necessary
> to determine whether a node in an RDF data graph is a SHACL instance of 
a
> classs.  My view is that this determination is done only by looking at 
the
> data graph - nothing in the shapes graph is consulted.
> 
> Consider, for example the following:
> 
> Shape graph:
> 
> ex:Rock rdfs:subclassOf foaf:Person . .
> 
> sx:USPShape rdf:type sh:Shape ;
>   shh:scopeClass ex:Person ;
>   sh:property [ sh:predicate foaf:knows ;
>                 sh:valueClass foaf:Person ] .
> 
> Data graph:
> 
> ex:Student rdfs:subClassOf foaf:Person .
> 
> ex:John rdf:type foaf:Person ;
>   foaf:knows ex:Harry .
> 
> ex:Harry rdf:type ex:Student ;
>   foaf:knows ex:John .
> 
> ex:Bill rdf:type foaf:Person ;
>   foaf:knows ex:Arnold .
> 
> ex:Arnold rdf:type foaf:Rock .
> 
> 
> When validating this data graph against this shape graph, all of 
ex:John,
> ex:Harry, and ex:Bill are checked against the constraints in sx:UPSShape
> because they are all SHACL instances of foaf:Person.   However, 
ex:Arnold is
> not checked because that node is not a SHACL instance of foaf:Person 
even
> though the shapes graph appears to so indicate.  Both ex:John and 
ex:Harry
> validate successfully but ex:Bill does not.

Oh my. While I understand what you're saying I have to say that as a user 
(an admittedly pretty candid one) this flies against all of my 
expectations.
Of course the first statement about ex:Rock being a subclass of 
foaf:Person got me to raise an eyebrow but once this is claimed I would 
expect the system to live by that, even though it makes no sense to me and 
presumably other human beings.

> 
> No one should write a shapes graph like this, precisely because it would 
give
> rise to the expectation that rocks are people.   There should probably 
be some
> warning about writing ontology axioms in the shapes graph.

Indeed, we'd better have some big warning about this because this is bound 
to trip people over.

> 
> peter
> 
> PS:  Why do I say "SHACL instance"?   The following addition to the data 
graph
> above
> 
>   ex:mySub rdfs:subPropertyOf rdfs:subclassOf .
>   ex:Rock ex:mySub foaf:Person .
> 
> does *not* change the analysis here because SHACL does not perform 
instance
> determination the same way that RDFS does.

I wonder how many people will figure this one out without stumbling first.
--
Arnaud  Le Hors - Senior Technical Staff Member, Open Web Technologies - 
IBM Software Group

Received on Friday, 2 October 2015 02:28:28 UTC