openlink / virtuoso-opensource

Virtuoso is a high-performance and scalable Multi-Model RDBMS, Data Integration Middleware, Linked Data Deployment, and HTTP Application Server Platform
https://vos.openlinksw.com
Other
869 stars 210 forks source link

Inference in combination with rdfs_rule_set and isIRI/isBlank not working #1

Open kenwenzel opened 12 years ago

kenwenzel commented 12 years ago

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.
openlink commented 12 years ago

We are looking into this issue.

kenwenzel commented 12 years ago

Is there any progress regarding this issue?

priverasalas commented 12 years ago

I have the same problem, any update?

icaromedeiros commented 11 years ago

I am also having the same problem. Any updates?