Owl Properties Reasoning Bug?

0 views
Skip to first unread message

john....@gmail.com

unread,
Aug 27, 2013, 11:47:56 AM8/27/13
to sta...@clarkparsia.com

Given:
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix test:    <http://test#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

test
:P2
      a       owl
:SymmetricProperty .

test
:P1
      a       owl
:TransitiveProperty .  


SELECT * { ?p a owl:ObjectProperty . }
       returns no result.

john....@gmail.com

unread,
Aug 27, 2013, 12:37:16 PM8/27/13
to sta...@clarkparsia.com, john....@gmail.com
I think the following testcases are correct.
Apologies if not. They are handwritten.

Given:

@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix test:    <http://test#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix owl:     <http://www.w3.org/2002/07/owl#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

test
:
P2
      a       owl
:SymmetricProperty ;
      rdfs
:subPropertyOf test:P0 .

test
:P1
      a       owl
:TransitiveProperty ;
      rdfs
:subPropertyOf test:P0 .

test
:P0
      a       owl
:ObjectProperty .


test
:C1
    a    owl
:Class .

test
:I1
    a    test
:C1 ;
    test
:P2    test:I2 .    

test
:I2
    a    test
:C1 .

test
:I3
    a    test
:C1 ;
    test
:P1    test:I4 .

test
:I4
    a    test
:C1 ;
    test
:P1    test:I5 .

test
:I5
    a    test
:C1 .




Query:

    SELECT * { ?p a owl:ObjectProperty . }
Returns:
    p = http://test#P0
Also Expected:
    p = http://test#P1
    p = http://test#P2

Query:
     SELECT * { ?s ?p ?o . ?p rdfs:subPropertyOf <http://test#P0>}
Returns:   
     s = http://test#I1                p = http://test#P2              o = http://test#I2        (Asserted)
     s = http://test#I3                p = http://test#P1              o = http://test#I4        (Asserted)
     s = http://test#I4                p = http://test#P1              o = http://test#I5        (Asserted)
Also Expected:
     s = http://test#I2                p = http://test#P2              o = http://test#I1        (SymmetricProperty Reasoning)
     s = http://test#I3                p = http://test#P1              o = http://test#I5        (TransitiveProperty Reasoning)

Query:
     SELECT * { ?s ?p ?o . ?p a owl:ObjectProperty}
Returns:   
     Nothing
Also Expected:
     s = http://test#I1                p = http://test#P2              o = http://test#I2        (SubProperty Reasoning)
     s = http://test#I3                p = http://test#P1              o = http://test#I4        (SubProperty Reasoning)
     s = http://test#I4                p = http://test#P1              o = http://test#I5        (SubProperty Reasoning)
     s = http://test#I2                p = http://test#P2              o = http://test#I1        (SymmetricProperty Reasoning)
     s = http://test#I3                p = http://test#P1              o = http://test#I5        (TransitiveProperty Reasoning)


Héctor Pérez-Urbina

unread,
Aug 27, 2013, 1:42:13 PM8/27/13
to stardog
Thanks, John. I'll take a closer look at this.


--
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en

To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.



--
Best,
Héctor
Message has been deleted

john....@gmail.com

unread,
Aug 29, 2013, 8:44:25 AM8/29/13
to sta...@clarkparsia.com
Hi Hector,
Thanks for your update.

The transitive-ness of rdfs:subPropertyOf doesn't seem to be RL reasoned either (may be the same propblem as the previous post, depending on how you guys implemented the reasoning and query expansion)

Again, apologies if there are typos in the handwriten testcases

@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tst:     <http://tst#> .

@prefix owl:     <http://www.w3.org/2002/07/owl#> .


tst
:Pr
      a       owl
:ObjectProperty .

tst
:Pr0
      a       owl
:ObjectProperty ;
      rdfs
:subPropertyOf tst:Pr .

tst
:Pr1
      a       owl
:ObjectProperty ;
      rdfs
:subPropertyOf tst:Pr0 .

tst
:Cl1
    a    owl
:Class .

tst
:In1
    a    tst
:Cl1 ;
    tst
:Pr1    tst:In2 .    

tst
:In2
    a    tst
:C1 .



Query:
      SELECT * { ?i1 <http://tst#Pr1> ?i2 . }
Returns:
       i1 = http://tst#In1       i2  =  http://tst#In2                 (Asserted and Correct)
Additional Expected Results:
      none

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr1>}
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (All properties are subPropertyOf self? )

Query:
        SELECT * { ?i1 ?p ?i2 . ?p owl:samePropertyAs <http://tst#Pr1> . }
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (All owl properties are owl:samePropertyAs self? )
Note:
       owl:samePropertyAs is mentioned in some drafts of OWL 1, but I don't see it in the final language specs for OWL 1 or OWL 2

Query:
        SELECT * { ?i1 ?p ?i2 . ?p owl:equivalentProperty <http://tst#Pr1> . }
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (All owl properties are owl:equivalentProperty self? )

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr0>}
Returns:   
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (correct subPropertyOf reasoning )
Additional Expected Results:
        none  

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr>}
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (Transitivity of subPropertyOf is not used in query)

Query:
       SELECT * { ?p rdfs:subPropertyOf <http://tst#Pr>}
Returns:   
       p = http://tst#Pr              (Reasoned property is subPropertyOf self)
       p = http://tst#Pr0            (Asserted)
       p = http://tst#Pr1            (Transitivity of subPropertyOf is used)
Additional Expected Results:
        none

Query:
       SELECT * { ?p owl:equivalentProperty <http://tst#Pr1> . }
Returns:   
       p = http://tst#Pr1              (Reasoned property is equivalentProperty self)
Additional Expected Results:
        none

Query:
       SELECT * { ?p owl:samePropertyAs <http://tst#Pr1> . }
Returns:   
       nothing
Additional Expected Results:
       p = http://tst#Pr1              (Reasoned property is samePropertyAs self)
Note:
       owl:samePropertyAs is mentioned in some drafts of OWL 1, but I don't see it in the final language specs for OWL 1 or OWL 2

john....@gmail.com

unread,
Dec 6, 2013, 6:50:37 AM12/6/13
to sta...@clarkparsia.com, john....@gmail.com

Any update on this?

I notice with version 2.0.3 that there seems to be even less reasoning performed?



@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tst:     <http://tst#> .

@prefix owl:     <http://www.w3.org/2002/07/owl#> .


tst
:Pr
      a       owl
:ObjectProperty .

tst
:Pr0
      a       owl
:ObjectProperty ;
      rdfs
:subPropertyOf tst:Pr .

tst
:Pr1
      a       owl
:ObjectProperty ;
      rdfs
:subPropertyOf tst:Pr0 .

tst
:Cl1
    a    owl
:Class .

tst
:In1
    a    tst
:Cl1 ;
    tst
:Pr1    tst:In2 .    

tst
:In2

    a    tst
:Cl1 .



Query:
      SELECT * { ?i1 <http://tst#Pr1> ?i2 . }
Returns:
       i1 = http://tst#In1       i2  =  http://tst#In2                 (Asserted and Correct)
Additional Expected Results:
      none

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr1>}
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (All properties are subPropertyOf self? )

Query:
        SELECT * { ?i1 ?p ?i2 . ?p owl:equivalentProperty <http://tst#Pr1> . }
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (All owl properties are owl:equivalentProperty self? )

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr0>}
Returns:   
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (correct subPropertyOf reasoning )
Additional Expected Results:
        none  

Query:
       SELECT * { ?i1 ?p ?i2 . ?p rdfs:subPropertyOf <http://tst#Pr>}
Returns:   
       nothing
Additional Expected Results:
        i1 = http://tst#In1       p = http://tst#Pr1         i2  =  http://tst#In2               (Transitivity of subPropertyOf is not used in query)


Query:
       SELECT * { ?p rdfs:subPropertyOf <http://tst#Pr>}
Returns:   
       p = http://tst#Pr0            (Asserted)
Additional Expected Results:
       p = http://tst#Pr              (Reasoned property is subPropertyOf self) (was returned in earlier versions)
       p = http://tst#Pr1            (Transitivity of subPropertyOf ) (was returned in earlier versions)



Query:
       SELECT * { ?p owl:equivalentProperty <http://tst#Pr1> . }
Returns:   
       Nothing
Additional Expected Results:
       p = http://tst#Pr1              (Reasoned property is equivalentProperty self) (was returned in earlier versions)

john....@gmail.com

unread,
Dec 6, 2013, 7:04:36 AM12/6/13
to sta...@clarkparsia.com, john....@gmail.com
Apologies ... Silly me! (Premature post!)

With reasoning enabled all queries work as expected. :-)
Thank you guys for your hard work

John
Reply all
Reply to author
Forward
0 new messages