Re: shapes-ISSUE-63 (sh:hasShape): Nested shapes: sh:hasShape function versus recursive SPARQL code generation [SHACL Spec]

On 6/11/15 3:07 AM, Peter Patel-Schneider wrote:
> It may have been convenient to use sh:hasShape for or, Xor, and not, but the
> results are not correct, as violations are not correctly defined.
Are you referring to the fact that recursion is not specified yet, or in 
what other cases are results not correct?

>
> sh:hasShape may have uses outside of SHACL, but that can only be a
> minor point here.
>
>
> I'm not against extension functions, so long as there is a clear, clean, and
> consistent definition for them.

That sounds good. We can at least address that.

>
>
> As far translating SHACL shapes to single SPARQL queries, I claim that
> https://www.w3.org/2014/data-shapes/wiki/Shacl-sparql provides such an
> approach.

You can claim whatever you like, but since your approach isn't 
well-defined we have no way of proving you wrong. Your document 
conveniently glances over some details with "... add other kinds of 
SHACL Shape Nodes here as needed ..." ignoring templates, ignoring the 
complications of variable scoping in SPARQL (e.g. with sub-selects), 
ignoring the problem of how to avoid variable clashes when SPARQL 
snippets are pasted together, ignoring how to specify things like Xor 
(which together with qualified cardinality restrictions may be very 
problematic), ignoring how to produce violation messages etc.

>    The translation approach has the distinct advantage that the query
> optimization techniques in existing SPARQL engines can be directly applied to
> the resultant query.  An approach using a SPARQL extension function will need
> special support.

Any translation approach would also require special support, only that 
it shifts the workload to the SHACL engine, vastly complicates the spec, 
and completely excludes other languages like JavaScript.

> However, the biggest problem with sh:hasValue is that it makes the
> current SHACL spec ill-formed.

Again, due to recursion?

Thanks,
Holger

Received on Wednesday, 10 June 2015 23:40:46 UTC