Re: recursive shapes in SHACL

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

On 03/24/2015 06:58 PM, Holger Knublauch wrote:
> 
> On 3/25/15 1:35 AM, Peter F. Patel-Schneider wrote: I believe that the 
> current design of SHACL (https://w3c.github.io/data-shapes/shacl/) will 
> make recursive shapes very problematic.
> 
> Both variations in 
> http://w3c.github.io/data-shapes/shacl/#sparql-AbstractValueShapePropertyConst
>
>
> 
raint
> do not work correctly. (Consider how the designs would work on the SHACL
>  versions of the examples in 
> https://lists.w3.org/Archives/Public/public-data-shapes-wg/2015Mar/0377.html.)
>
>
> 
>> In that email, is the issue due to the combination of sh:valueShape 
>> with OrConstraint?

The problems occur with just recursive shapes. Neither disjunction nor
negation nor cardinalities are required.

>> In the quick prototype that I published on Monday, I have changed the 
>> logic so that it throws an error when the same node/shape combination 
>> is reached for the second time within the same recursion, see line 53 
>> of
> 
>> https://github.com/HolgerKnublauch/shacl-lite/blob/master/src/org/topbraid/shacl/lite/SHACLLiteConstraintValidator.java

Well
>>
>> 
that violates the spec.

>> Would adding such a clause to the spec help? (Sorry if this was 
>> discussed before, I was not able to dedicate sufficient attention to 
>> the various ShEx-related emails on this topic).

I don't think adding something like "a recursive shape evaluation results in
an error" is a good idea. It would be like saying that "a query that
results in more than ten rows with the same IRI in the second column results
in an error".

>> Otherwise, how do you propose we proceed on the sh:valueShape topic?

Well, it's not the ability to refer to other shapes that is the problem, it
is the ability to recursively refer back to the shape itself. One way
forward is to forbid recursive shapes.

>> Thanks, Holger
> 
> 
> Does anyone have a proposal on how to handle recursive shapes that does 
> not give rise to difficulties?
> 
> 
> peter

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

iQEcBAEBAgAGBQJVEiMHAAoJECjN6+QThfjzwF8H/RQMgygdCj9ffWgsv6Q0cTAC
aSaDHqT1Kv7nC5S320/J8535+MzSyeaUTzRlKKmDSwlqg1b3sTScMZ5OXhoKxD2X
dVrFF7lYuvpo5Wfy6QyD/+P9phfiPjBOhqNZi7rfU3zeKyG8XxNuSSf2oaEtgqo3
swbKkDMu8fUdL4yv279iyMVILXvdFLz51MTxAb5GKTKwm2GqwIG8e2FQNTqbdXZv
6aqagWsLRl8vW0/UetHZZ5/B2PBI7+tfd9yAvHE8AciRa+W8r4KU+JHCl/g0PdVV
Dnemr2J7YW2s88B30w0BzmRTk2CRfl9P4Xl5GmROsRR3wSAY3g7dcVhleSb8ejs=
=RTPC
-----END PGP SIGNATURE-----

Received on Wednesday, 25 March 2015 02:53:25 UTC