Re: proposed test case for SHACL

SHACL explicitly depends on the entirety of SPARQL through its use of
SPARQL-based constraints and SPARQL-based constraint components.

Any valid SPARQL-based constraint is a suitable test case for SHACL.
SPARQL-based constraints that are more likely to be implemented incorrectly in
SHACL, as this one is, are especially desirable.

The working group could change the SHACL document to make this test case less
useful.  My view is that with the current SHACL document this test case is
required to be part of the SHACL test suite.

Peter F. Patel-Schneider
Nuance Communications



On 02/08/2017 05:25 PM, Holger Knublauch wrote:
> Could you clarify why you believe that a test case relying on EXISTS (with its
> currently undecided status in SPARQL) would make sense? I believe the most
> prudent action would be to explicitly *not* have any tests that use EXISTS in
> our test suite. We could add such a thing once the SPARQL spec has been
> updated with an erratum.
> 
> Holger
> 
> 
> On 9/02/2017 10:22, Peter F. Patel-Schneider wrote:
>> Here is a good test case for SPARQL-SHACL.
>>
>> Shapes Graph:
>>
>> @prefix sh: <http://www.w3.org/ns/shacl#> .
>> @prefix ex: <http://example.org/rock/> .
>>
>> ex:s1 sh:targetClass ex:Person ;
>>    sh:sparql [ sh:select """ SELECT $this WHERE {
>>      FILTER NOT EXISTS { $this
>>          <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
>>     <http://example.org/rock/Rock> . } } """ ] .
>>
>> Data Graph:
>>
>> @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
>> @prefix ex: <http://example.org/rock/> .
>>
>> _:john rdf:type ex:Person .
>> ex:pet rdf:type ex:Rock .
>>
>> Results:
>>
>> Given a definition for pre-binding that matches intuitions in this case
>> (which is, of course, not assured) the data graph conforms to the shapes
>> graph.
>>
>>
>> Peter F. Patel-Schneider
>> Nuance Communications
>>
> 
> 

Received on Thursday, 9 February 2017 01:38:29 UTC