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

* Peter F. Patel-Schneider <pfpschneider@gmail.com> [2015-03-25 07:40-0700]
> 
> 
> On 03/25/2015 07:12 AM, Eric Prud'hommeaux wrote:
> > * Peter F. Patel-Schneider <pfpschneider@gmail.com> [2015-03-25 
> > 03:08-0700]
> >> Exploring all the possible models is potentially exponential in the 
> >> size of the data graph.  Someone is going to have to come up with an 
> >> optimized method for exploring this large space of options.
> > 
> > Yeah, there will always be an exponential component. My strategy has
> > been to reset some of the cached values between validating one target
> > and another, specifically those that were involved in a cycle.
> 
> I don't know whether this is adequate. I don't even know whether it will
> produce the correct answers. Right now, the demo is producing incorrect
> answers (i.e., reporting validations that are not supported by any model) in
> some cases.

If you refer to the fact that some things say "assuming: " and nothing
afterwards, that list is the diffs from the model intersection (stuff
that's true in all models). (I've also just made that go away when the
list is empty.)


> >> One way of overcoming the problems of recursive shapes is just to 
> >> forbid them.  This is the solution that I currently prefer.
> > 
> > What about if we start with a semantics that forbids them in order to 
> > find a common ground, and then the folks who want oneOf beat you up
> > until you yield? Or maybe come up with a satisfactory semantics or rule
> > some stuff out with prose?
> 
> Well, it's not the semantics that forbids things like this, it's the syntax.
> In any case, the common ground that currently appears to be missing is what
> sort of semantics is going to be used, and forbidding recursive shapes
> doesn't affect that.

Pure conjunction with no negation is adequately handled by assuming
that any cyclic passes, no?

schema:
  <S1> { :p1 @<S2> }
  <S2> { :p2 @<S1> }

data:
  :a :p1 :b .
  :b :p2 :c .
  :c :p1 :d .
  :d :p2 :a . <== here we've seen :a AS <S1> so we assume success.


> 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 Wednesday, 25 March 2015 14:53:28 UTC