Hi,

After upgrading our code as well as SPINRDF from 3.0.1 to
3.16.0-SNAPSHOT, some constraint violation-related tests are failing.

With 3.16.0-SNAPSHOT, it seems that a bunch of constraint violations
are coming from the SPIN vocabulary iself, e.g. "Attribute spin:body :
 [0,1]" on spin:ConstructTemplates, spin:SelectTemplates etc.
With 3.0.1, no such internal validations are produced.

The models being validated use a basic RDFS inference (subclassing etc.)

I have tracked the source of the difference to query execution in
SPINConstraints.runQueryOnClass():
https://github.com/spinrdf/spinrdf/blob/master/src/main/java/org/spinrdf/constraints/SPINConstraints.java#L614

Since SPINRDF code hasn't changed, only the Jena versions, could there
be differences in query execution? The specific query that produces
different results is this:

CONSTRUCT
  {
    _:c0 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://spinrdf.org/spin#ConstraintViolation> .
    _:c0 <http://spinrdf.org/spin#violationRoot> ?this .
    _:c0 <http://spinrdf.org/spin#violationPath> ?predicate .
  }
WHERE
  { ?this  a  ?TYPE_CLASS
      { FILTER ( bound(?minCount) && (
<http://spinrdf.org/spl#objectCount>(?this, ?predicate) < ?minCount )
) }
    UNION
      { FILTER ( bound(?maxCount) && (
<http://spinrdf.org/spl#objectCount>(?this, ?predicate) > ?maxCount )
) }
    UNION
      { FILTER bound(?valueType)
        ?this  ?predicate  ?value
        FILTER ( ! <http://spinrdf.org/spl#instanceOf>(?value, ?valueType) )
      }
  }

The query string and initial bindings are the same with both versions,
for example:

( ?predicate, spin:body )( ?comment, "the body of the Template" )(
?minCount, 0 )( ?TYPE_CLASS, spin:Template )( ?maxCount, 1 )

Are there some obvious suspects here or do I need to create a
reproducible example?

Thanks,

Martynas

Reply via email to