Re: shapes-ISSUE-23 (punning): Shapes, classes and punning [SHACL Spec]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/03/2015 08:40 AM, Richard Cyganiak wrote:
> Hi Peter,
> 
>> On 3 Apr 2015, at 15:05, Peter F. Patel-Schneider
>> <pfpschneider@gmail.com> wrote:
>> 
>> I think that the idea for punning in SHACL is to allow for RDF nodes
>> that denote both a shape and a class while still keeping these two
>> identities apart.   In this way stating that the type of an individual
>> is a class&shape would not trigger any shape-based stuff, because
>> typing would be on the class identity, not the shape identity.
> 
> That’s not quite the behaviour that I’m after. (Which, thinking more
> about it, may mean that it’s not as similar to OWL 2 punning as I
> thought.)

Indeed.  I expect that you are not looking for something like punning.

> A statement of form
> 
> :MyInstance rdf:type :MyClassAndShape
> 
> should still mean that validate(:MyInstance) checks any constraints
> attached to :MyClassAndShape.

s/attached to/associated with/  to permit other ways of making the
connection between classes and shapes.

> Here’s a scenario that uses an approach where classes and shapes are
> distinct:
> 
> # Data :MyInstance rdf:type :MyClass.
> 
> # Constraint graph :MyClass rdfs:label “My Class”@en. :MyClass
> sh:classShape :MyShape. :MyShape sh:constraint [ … ].
> 
> In the case where :MyClass and :MyShape are defined by the same party
> (e.g., for closed-world in-house use cases, or for things like R2RML and
> the Data Cube Vocabulary), I think it is wasteful and confusing having to
> define two separate nodes here, :MyClass and :MyShape. So I want to say
> simply:
> 
> # Data :MyInstance rdf:type :MyClassAndShape.
> 
> # Constraint graph :MyClassAndShape rdfs:label “My Class (and
> Shape)”@en. :MyClassAndShape sh:constraint [ … ].
> 
> And this should have the same effect. So, compared to the previous
> approach, here we have merged two nodes into one, and eliminated the arc
> connecting them, because in my use case there is no value in keeping the
> two nodes separate.

So this is all about saving one node and triple?  (Or maybe two nodes and
two triples?)  Any only sometimes?

A punning solution would require a
  :MyClassAndShape sh:classShape :MyClassAndShape .
triple to make the connection between the class and the shape, I think.

> This is what I mean when I (mis-?)use the word “punning”: I want to be
> able to merge two RDF nodes and eliminate the arc between them, while
> still having exactly the same behaviour.

Yup, that's not punning.

> Best, Richard


peter


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBAgAGBQJVHuHsAAoJECjN6+QThfjz1t0IAIUpbsRc9hEIr52TSuJS+erg
3MGcYdafVPeAfZ82JAnD7Bwmv4FqarXw/IphXmjHjprJBCi3NYqqG9I9djm+ulfK
+iNIzB1d/KTtYV0bDZbZx7ZTcmlSEBbAIhMP713hiLstHjmmblCMvRA9lfBNQbLw
iQ6BV1QiFTYZ9YtprcHlOWlOndvWVSDSo/F0fGR7zcjkoZP6kTa/0TE1+9kkRRon
2GFaIOzmEJVXkCAtYU5nz+5zhITubzpLW0yXm725NPNPaT0ydJTaHjaRs4IGeIH0
jGRVFHvFQkT9t2WxuEFibCkOE4MP9XcfYvvwoYFPtSACTgomYP64jUo0tHO56sA=
=c1NF
-----END PGP SIGNATURE-----

Received on Friday, 3 April 2015 18:55:11 UTC