- From: Eric Prud'hommeaux <eric@w3.org>
- Date: Mon, 16 Mar 2015 16:41:42 -0400
- To: "Peter F. Patel-Schneider" <pfpschneider@gmail.com>
- Cc: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
* Peter F. Patel-Schneider <pfpschneider@gmail.com> [2015-03-16 04:57-0700] > > > On 03/15/2015 07:07 PM, Eric Prud'hommeaux wrote: > > cherry-picking the easy stuff 'cause i'm rather late for bed. > > > > * Peter F. Patel-Schneider <pfpschneider@gmail.com> [2015-03-15 > > 18:24-0700] > >> On 03/15/2015 05:39 PM, Eric Prud'hommeaux wrote: > >>> * Peter F. Patel-Schneider <pfpschneider@gmail.com> [2015-03-15 > >>> 12:55-0700] > >>>> A few questions and comments. > >>>> > >>>> > >>>> Is this the entirety of SHACL or just the core language? The > >>>> language here does not cover closed shapes, exclusive or, global > >>>> constraints, maximum cardinality of 0, non-datatype type matching, > >>>> or datatype facets. > >>> > >>> Agreed, it seemed wisest to start with a conservative subset and > >>> add. > >> > >> The problem is that adding may be problematic or impossible. How, for > >> example, is this account going to handle closed shapes or global > >> constraints or extension via SPARQL code? > > > > Closed shapes can be implemented if `triple constraint matches` returns a > > set of passing and failing triples and `shape matches` subtracts the > > passing from the failing, returning true if their are no more failing > > triples. `and constraint matches` returns all of the passing and failing > > and `or constraint matches` returns those from the passing disjuncts. > > I don't think that this works correctly, or at least it runs counter to my > intuitions as to what closed shapes are supposed to do. Consider a shape like > S1 = and ( property p shape S2 ; > property p shape S3 ) > S2 = property q > S3 = property r > It seems to me that this should be a closed match to > x p y . > y q a . > y r b . > but the S2 and S3 matches will return false. Yeah, sorry, I was actually giving the recipe for multi-occurance. There's a notion of closed shapes, but I think it's not as important as closed schemas / graph coverage. For that, I use a modification of the above algorithm where the passes and fails bubble all the way up to the outer invocation. http://www.w3.org/2013/ShEx/FancyShExDemo.html?schema=PREFIX%20%3A%20%3Chttp%3A%2F%2Fa.example%2F%3E%0A%0Astart%3D%3AS1%0A%0A%3AS1%20%7B%0A%20%20%3Ap%20%40%3AS2%20%2C%0A%20%20%3Ap%20%40%3AS3%0A%7D%0A%3AS2%20%7B%20%3Aq%20.%20%7D%0A%3AS3%20%7B%20%3Ar%20.%20%7D%0A&data=PREFIX%20%3A%20%3Chttp%3A%2F%2Fa.example%2F%3E%0A%0A%3Ax%20%3Ap%20%3Ay%20.%0A%3Ay%20%3Aq%20%3Aa%20.%0A%3Ay%20%3Ar%20%3Ab%20.%0A&starting-nodes=%3Ax&colorize=true says that the coverage works and detects the remaining triples. > peter > -- -ericP office: +1.617.599.3509 mobile: +33.6.80.80.35.59 (eric@w3.org) Feel free to forward this message to any list for any purpose other than email address distribution. There are subtle nuances encoded in font variation and clever layout which can only be seen by printing this message on high-clay paper.
Received on Monday, 16 March 2015 20:41:46 UTC