We're updating the issue view to help you get more done. 

Inverse property path parsing bug

Description

We found a bug in property path parsing using inverse paths. I am not sure, but it might only occur when the inverse are adjacent, I wasn't able to get that far into the code to verify.

If I have this path:

1 ?hm ^mb:current_id/^rdfs:seeAlso/mb:targets ?refseq .

The algebra ends up:

1 2 3 4 5 6 7 8 9 10 11 12 StatementPattern Var (name=-const-5-0, anonymous) Var (name=-const-5, value=http://purl.mirbase.org/owl/current_id, anonymous) Var (name=hm) StatementPattern Var (name=-const-6-1, anonymous) Var (name=-const-6, value=http://www.w3.org/2000/01/rdf-schema#seeAlso, anonymous) Var (name=hm) StatementPattern Var (name=-const-6-1, anonymous) Var (name=-const-7, value=http://purl.mirbase.org/owl/targets, anonymous) Var (name=refseq)

so you can see the path is broken between the seeAlso & currentId patterns, i think the subject of the seeAlso should be const-5-0.

If you break up the path:

1 ?hm ^mb:current_id/^rdfs:seeAlso ?tfam . ?tfam mb:targets ?refseq .

The algebra is correct:

1 2 3 4 5 6 7 8 9 10 11 12 StatementPattern Var (name=-const-5-0, anonymous) Var (name=-const-5, value=http://purl.mirbase.org/owl/current_id, anonymous) Var (name=hm) StatementPattern Var (name=tfam) Var (name=-const-6, value=http://www.w3.org/2000/01/rdf-schema#seeAlso, anonymous) Var (name=-const-5-0, anonymous) StatementPattern Var (name=tfam) Var (name=-const-7, value=http://purl.mirbase.org/owl/targets, anonymous) Var (name=refseq)

This is reproducible on Sesame 2.7.1, I'm on OSX 10.8.3 w/ Java 1.6.0_45.

The full (incorrect) query:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 PREFIX syndb:<http://purl.synaptomedb.org/owl/> PREFIX mb:<http://purl.mirbase.org/owl/> PREFIX ts:<http://purl.targetscan.org/owl/> PREFIX ex:<http://purl.example.com/owl/> PREFIX obo:<http://purl.obolibrary.org/obo/> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> PREFIX up:<http://purl.uniprot.org/core/> PREFIX taxon:<http://purl.uniprot.org/taxonomy/> PREFIX db:<http://purl.example.com/database/> SELECT DISTINCT ?hm ?refseq WHERE { ?hm up:organism taxon:9606 . ?hm up:database db:mirbase_id . ?hm ^mb:current_id/^rdfs:seeAlso/mb:targets ?refseq . } LIMIT 2

Environment

OSX 10.8.3 w/ Java 1.6.0_45.

Status

Assignee

JeenB

Reporter

Michael Grove

Labels

None

Components

Fix versions

Affects versions

2.7.1

Priority

Major