Re: ISSUE-22: Proposal based on sh:hasShape

On 6/25/2015 5:51, Arthur Ryman wrote:
> Holger,
>
> Are you saying that validation will fail if your engine encounters a
> recursive call?
>
> If so, I disagree with this proposal because it eliminates very
> natural and useful forms of recursion that have completely
> well-defined semantics, e.g. the way oslc:valueShape works.
>
> The way to avoid infinite loops is to keep track of which shapes must
> be validated on which nodes. In effect, you are maintaining a graph
> whose nodes are pairs (x,s) where x is an RDF node and s is a shape
> name. As you validate x wrt s, you mark (x,s) as visited. During the
> validation, you may need to validate a neighbouring RDF node y with a
> shape r. You see if (y,r) is already visited. If not, you continue the
> validation on y wrt r. This process never leads to infinite loops. I
> have described it in detail in [1].

 From your description above this sounds similar to what Arnaud 
suggested earlier: if a node/shape combination is visited twice, then 
just assume OK and continue? This would be a trivial change, if it does 
indeed produce the correct answers.

>
> That being said, I am not sure about the case involving negation and
> disjunction of shapes, but Iovka has a proposed semantics for that.

My understanding was that these cases are where the trouble starts, so 
we need a definite response before adopting that solution. Meanwhile my 
suggestion was to be conservative, on the safe side. If we find a better 
solution (that Peter doesn't find flaws in :) ) then I'd be happy to 
update the proposal.

Thanks,
Holger

Received on Thursday, 25 June 2015 00:01:27 UTC