Hello,

we've recently encountered a potential bug
related to Virtuoso's inference rule support in combination
with isIRI and isBlank builtins in SPARQL queries:

The functions isIRI/isBLANK always return true/false for inferred
bindings whether the bound value is a BNode or not.

This behaviour was observed with the Windows (Windows XP) and 
the Linux version (Ubuntu 10.04) of Virtuoso 6.1.4.

Steps to reproduce the problem:

1. Insert some test data:
-------------------------

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX test: <http://example/inferencetest#>

insert into <http://example/inferencetest#> {
        test:Tree a owl:Class ;
        rdfs:subClassOf [
                a owl:Restriction ;
                owl:onProperty test:hasChildren ;
                owl:allValuesFrom test:Node
        ] .
        test:Node a owl:Class .
        test:TheTree a test:Tree
}

2. Create rule set:
-------------------

rdfs_rule_set('http://example/inferencetest#',
'http://example/inferencetest#')

3. Execute SPARQL query with inference rules:
---------------------------------------------

define input:inference 'http://example/inferencetest#'

select * 
from <http://example/inferencetest#>
where {
    ?s a ?o filter (isIRI(?s) && isIRI(?o))
}

4. Observations:
----------------

The restriction BNode is filtered in the case when it occurs
as asserted ?s but not in the case when it is an inferred ?o.


Best regards,

Ken

Reply via email to