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

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

Why was I using the following example to check out recursive shapes in Shape
Expressions?

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

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 .

Consider ex:b and ex:c.

Can they both match the shape <T>?  No, if they both match the shape <T>
then both branches of the xor are true for each of them and they don't match
the shape <T>.  Can they both not match the shape <T>?  No, if they both
don't match the shape <T> then only one branch of the xor is true for each
of them and they do match the shape <T>.

What's left?  One of them has to match and the other not, but which one?  No
matter which one matches, however, ex:a doesn't match <S> because that would
need both to match.



A tougher test is

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

PREFIX ex: <http://ex.example/#>
ex:a ex:q ex:z .
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 .

Here ex:a matches <S>.

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

iQEcBAEBAgAGBQJVDFwMAAoJECjN6+QThfjzQv0H/RcX4rXh+ElbSUEWEUWcDXy4
x2T6CcEPO4AwofCi0edQZB+8IPaenmVcADbYWUtmEkJjCnFd5kZiIUzHQ1SXc9oy
VM8mjB6M2KhFD6x24c7gFtvpvC9SDwCmbEw1iZEvIEI+waRUHC46hrWZRtkys5ZK
Nu5BeYU/izMn/ysaOiDl+L8ub8IIbZw4RpD++vkQS9aw4+m/Jv7odFjLOzprsmxk
PuQfmC4+1zoPKMt3CCVCtMdTvur5+XpgxAlJl7kvpjmGhWSKQNGRbNZUb89miaEX
tkY+FOiqWhU3XD8i8z+2QF1pYsr/zkxpQEAcGq8hxg5Z5UVSxakJTWKejME1A84=
=AKzn
-----END PGP SIGNATURE-----

Received on Friday, 20 March 2015 17:43:11 UTC