W3C home > Mailing lists > Public > public-rdf-shapes@w3.org > February 2017

Re: proposed test case for SHACL

From: Peter F. Patel-Schneider <pfpschneider@gmail.com>
Date: Wed, 8 Feb 2017 17:37:49 -0800
To: Holger Knublauch <holger@topquadrant.com>, public-rdf-shapes@w3.org
Message-ID: <4e0d9747-0be0-0c4a-9175-b34816187e92@gmail.com>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:02:48 UTC