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

Bug in property path parsing involving ^ and *

Description

If I have the path:

1 ?mainTopic :hasTopic* | ^:hasTopic* ?relatedTopic

that is the same as

1 ?mainTopic (:hasTopic)* | ^(:hasTopic)* ?relatedTopic

The parens don't change the precedence of anything because the operators are left outside of them. However, with the former, I get:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Union ArbitraryLengthPath Var (name=mainTopic) StatementPattern Var (name=mainTopic) Var (name=-const-6, value=#hasTopic, anonymous) Var (name=relatedTopic) Var (name=relatedTopic) ArbitraryLengthPath Var (name=mainTopic) StatementPattern Var (name=mainTopic) Var (name=-const-7, value=#hasTopic, anonymous) Var (name=mainTopic) Var (name=relatedTopic)

While the latter produces (what I think is the correct algebra in either case)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 ArbitraryLengthPath Var (name=mainTopic) StatementPattern Var (name=mainTopic) Var (name=-const-6, value=http://fashiontology.org/ontology-site-abstract.owl#hasTopic, anonymous) Var (name=relatedTopic) Var (name=relatedTopic) ArbitraryLengthPath Var (name=relatedTopic) StatementPattern Var (name=relatedTopic) Var (name=-const-7, value=http://fashiontology.org/ontology-site-abstract.owl#hasTopic, anonymous) Var (name=mainTopic) Var (name=mainTopic)

The inverse path is messaged up in the former case, though, even if the latter is the wrong interpretation, afaik, they should be the same algebra.

Environment

Java 1.6.0_37, OSX 10.8.2

Status

Assignee

JeenB

Reporter

Michael Grove

Labels

Components

Fix versions

Affects versions

2.6.10

Priority

Major