on determinism in SPARQL constraints

What happens if a SPARQL query in SHACL is non-deterministic?  Is there any
guarantee about when and how often SPARQL queries are processed to produce a
query result?

For example are there any guarantees that

**prefixes, etc., as needed**

s:s1 rdf:type sh:Shape ;
 sh:targetClass ex:c1 ;
 sh:property [ sh:predicate ex:p1 ;
               sh:qualifiedMinCount 1 ; sh:qualifiedMaxCount 1 ;
               sh:qualifiedValueShape [
          sh:property [ sh:predicate ex:p2 ;
            sh:shape s:s2 ] ] ] .

s:s2 rdf:type sh:Shape ;
 sh:sparql [ sh:prefixes ex: ;
  sh:select """SELECT $this WHERE {
             BIND ( ( RAND() * 25 )  AS ?r )
             FILTER ( STRLEN($this) < ?r ) }""" ] .

will never produce a violation on the data graph

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ex: <http://ex.org/>

ex:i1 rdf:type ex:c1 ;
 ex:p1 [ ex:p2 ex:i3 ], [ ex:p2 ex:i3 ] .


Peter F. Patel-Schneider
Nuance Communications

Received on Saturday, 1 October 2016 00:25:56 UTC