W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > March 2015

is there an implementation of Shape Expressions that correctly handles recursive shapes?

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Fri, 20 Mar 2015 06:54:24 -0700
Message-ID: <550C2690.3070100@gmail.com>
To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have been looking over recursive shapes in Shape Expressions.   It appears
to me that two of the three definitions for Shape Expressions are
ill-founded on recursive shapes.

I have also been trying to test out implementations of recursive shapes in
Shape Expressions.  There are five implementations of Shape Expressions
listed on http://www.w3.org/2001/sw/wiki/ShEx

Of these five
the section on Fancy ShEx Demo has links to three online tools of which the
ShEx Demo appears to be the one to use to check out how Shape Expressions work,
the link for JSShexTest puts up a bare-bones online tool,
the link for RDFShape does not produce any result,
the link to ShExcala produces a page that points to RDFShape as its online
tool, and
the link to Haws produces a 404 error.

I tried the following example of a recursive shape in all the ways that I
could think of in the online tools:


SCHEMA:

PREFIX ex: <http://ex.example/#>
start = <S>
<S> { ex:p @<T>* }
<T> { ( ex:q @<Z> | ex:r @<T> ) }
<Z> { }

DATA:

PREFIX ex: <http://ex.example/#>
ex:a ex:p ex:b .
ex:a ex:p ex:c .
ex:b ex:q ex:z .
ex:c ex:q ex:z .
ex:b ex:r ex:c .
ex:c ex:r ex:b .

ShEx Demo (http://www.w3.org/2013/ShEx/FancyShExDemo) appears to go into an
infinite loop on this input.

JSShexTest (http://www.jessevandam.nl/) very quickly produces
Shex validation: Succes
Result: FAIL
which I read to mean that the validation failed, as expected.  However, I
was not sure so I dug further.  The description of JSShexTest is supposed to
be in http://www.w3.org/2001/sw/wiki/ValidationCode.   That page gives or as
an inclusive or and not the exclusive or of Shape Expressions.  Under this
reading of or, it appears to me that the result should be a success, but the
documentation is too spotty for me to be sure of this.


Is there an implementation of Shape Expressions that correctly handles
recursive shapes?



peter
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJVDCaQAAoJECjN6+QThfjz3FkIANStHY/k8AuZfwnb+FGpTTdg
IrnjOQ+PdGRlmHUwDsifIM/lV1B8wyjU1kWIGm4JzYC5ZQanKAFzolQNWSZdXYOn
YFlc2OjjTR5ilz4diH4FCCwJKclBTdZpQFS3dUUKKDzU9AWHQhdtzOVLwIhKxnou
mmwnTldrPCY/QsXujpOAuhYdo9xbi8VY1Q9sQscsBpQCiisuyPD5VnLjcaICHWDP
eEwgyVFGNGcgHLB2hnfkYVOxPTa/5JW7bFOPsnwPM6Wg3Ai+dAYLj3QioEPmJp4u
FGy27J21UK2p5cD8X7qj1mJ40vocSQqgQB58sOeat98YPSguQXHU3BF7uoxs9Tk=
=3Pgi
-----END PGP SIGNATURE-----
Received on Friday, 20 March 2015 13:54:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:30:18 UTC