Does Stardog allow local reflexivity?

1 view
Skip to first unread message

justforthe...@gmail.com

unread,
Apr 18, 2016, 3:57:52 AM4/18/16
to Stardog
I am using a TBox with this axiom:

ex:Document owl:equivalentClass [ rdf:type owl:Restriction ;
                                       owl:onProperty ex:SelfDocument ;
                                       owl:hasSelf "true"^^xsd:boolean
                                     ] ;

Which I have tested correctly on Hermit. I use Stardog RL reasoning for my Stardog database, but I 
know local reflexivity is only allowed in EL (although there is no technical reason not to have it in 
RL). However, neither SL nor EL are giving me the expected results. Am I missing something?

Zachary Whitley

unread,
Apr 18, 2016, 6:33:48 AM4/18/16
to sta...@clarkparsia.com
Can you include what you used to test?

--
-- --
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
---
You received this message because you are subscribed to the Google Groups "Stardog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stardog+u...@clarkparsia.com.

Jeremy Iron

unread,
Apr 18, 2016, 6:58:03 AM4/18/16
to stardog
It is a chain. In Protege it would be something like:

writesChapter o isPartOf o SelfDocument   --> writesDocument

If I create explicitly the relation   ex:doc1 ex:SelfDocument ex:doc1  then Stardog gives me the results I expect from the chain. But if I expect the relation to be created by reasoning then I get nothing, since the last part of the chain (SelfDocument) is missed for the reasoning to compute.

Thanks.




You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/8F7OMnYqUiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+u...@clarkparsia.com.

Zachary Whitley

unread,
Apr 18, 2016, 7:01:01 AM4/18/16
to sta...@clarkparsia.com


On Apr 18, 2016, at 3:57 AM, justforthe...@gmail.com wrote:

I'm only going on the convention that classes are capitalized but is ex:SelfDocument declared to be a property and not a class?

justforthe...@gmail.com

unread,
Apr 18, 2016, 7:08:27 AM4/18/16
to Stardog
Yes, it is a property. If I create the axiom explicitly myself, it works.

(This is just an example, but I just named it uppercase because I want to mark that it is a special property for "rolification" purposes.)

Zachary Whitley

unread,
Apr 18, 2016, 9:19:36 AM4/18/16
to Stardog
On Mon, Apr 18, 2016 at 7:08 AM, <justforthe...@gmail.com> wrote:
Yes, it is a property. If I create the axiom explicitly myself, it works.

(This is just an example, but I just named it uppercase because I want to mark that it is a special property for "rolification" purposes.)



Take a look at the logs in stardog.log. I'm getting "Not a valid SL axiom". It works if you change the reasoning type to DL.

Zachary Whitley

unread,
Apr 18, 2016, 9:25:07 AM4/18/16
to Stardog
On Mon, Apr 18, 2016 at 9:19 AM, Zachary Whitley <zachary...@wavestrike.com> wrote:


On Mon, Apr 18, 2016 at 7:08 AM, <justforthe...@gmail.com> wrote:
Yes, it is a property. If I create the axiom explicitly myself, it works.

(This is just an example, but I just named it uppercase because I want to mark that it is a special property for "rolification" purposes.)



Take a look at the logs in stardog.log. I'm getting "Not a valid SL axiom". It works if you change the reasoning type to DL.

Interestingly it appears to work in EL as well as expected. I'll have to review how SL is handled but it seems like it might be a bug in SL reasoning.

Zachary Whitley

unread,
Apr 18, 2016, 9:29:41 AM4/18/16
to Stardog
On Mon, Apr 18, 2016 at 9:25 AM, Zachary Whitley <zachary...@wavestrike.com> wrote:


On Mon, Apr 18, 2016 at 9:19 AM, Zachary Whitley <zachary...@wavestrike.com> wrote:


On Mon, Apr 18, 2016 at 7:08 AM, <justforthe...@gmail.com> wrote:
Yes, it is a property. If I create the axiom explicitly myself, it works.

(This is just an example, but I just named it uppercase because I want to mark that it is a special property for "rolification" purposes.)



Take a look at the logs in stardog.log. I'm getting "Not a valid SL axiom". It works if you change the reasoning type to DL.

Interestingly it appears to work in EL as well as expected. I'll have to review how SL is handled but it seems like it might be a bug in SL reasoning.


Doesn't seem like there are any exceptions about SL that I would be missing. If it's ok in EL it should be ok in SL. From the docs "... and SL for a combination of RDFS, QL, RL, and EL axioms, plus SWRL rules."

justforthe...@gmail.com

unread,
Apr 18, 2016, 9:36:30 AM4/18/16
to Stardog
Mmmm... However, it doesn't work for me in any of the reasoning schemas (not EL, SL, DL...) 

Zachary Whitley

unread,
Apr 18, 2016, 10:07:51 AM4/18/16
to Stardog
On Mon, Apr 18, 2016 at 9:36 AM, <justforthe...@gmail.com> wrote:
Mmmm... However, it doesn't work for me in any of the reasoning schemas (not EL, SL, DL...) 

Can you include enough of your data, queries and what you are expecting to recreate what you're doing? I only had what you sent to go on.
 

Jeremy Iron

unread,
Apr 18, 2016, 10:13:39 AM4/18/16
to stardog
Sure, give me some time and I will recreate the smallest version possible. Thanks.

You received this message because you are subscribed to a topic in the Google Groups "Stardog" group.
To unsubscribe from this topic, visit https://groups.google.com/a/clarkparsia.com/d/topic/stardog/8F7OMnYqUiA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to stardog+u...@clarkparsia.com.

Zachary Whitley

unread,
Apr 18, 2016, 10:40:14 AM4/18/16
to Stardog
On Mon, Apr 18, 2016 at 10:13 AM, Jeremy Iron <justforthe...@gmail.com> wrote:
Sure, give me some time and I will recreate the smallest version possible. Thanks.

Can you also include what version of Stardog you're using?

justforthe...@gmail.com

unread,
Apr 18, 2016, 11:42:27 AM4/18/16
to Stardog
Ok, I have been able to get an example that I think it could be suitable (it doesn't make much sense, but I think it can reproduce my issue).

System Architecture: amd64
Stardog Version: 4.0-RC3


example.ttl
==================================

<http://www.example.com/d#> rdf:type owl:Ontology .


ex:RolifBook rdf:type owl:ObjectProperty .
ex:hasBook rdf:type owl:ObjectProperty .
ex:hasChapter rdf:type owl:ObjectProperty .
ex:hasLine rdf:type owl:ObjectProperty .
ex:hasPage rdf:type owl:ObjectProperty .
ex:writesBook rdf:type owl:ObjectProperty ;
            owl:propertyChainAxiom ( ex:hasChapter
                                     ex:hasBook
                                     ex:RolifBook
                                   ) ,
                                   ( ex:hasLine
                                     ex:writesBook
                                   ) ,
                                   ( ex:hasPage
                                     ex:writesBook
                                   ) .

ex:Book rdf:type owl:Class ;
      owl:equivalentClass [ rdf:type owl:Restriction ;
                            owl:onProperty ex:RolifBook ;
                            owl:hasSelf "true"^^xsd:boolean
                          ] .

ex:book1 rdf:type owl:NamedIndividual ,
                ex:Book .

ex:chapter1 rdf:type owl:NamedIndividual ;
          ex:hasBook ex:book1 ,
                   ex:newspaper1 .

ex:john rdf:type owl:NamedIndividual ;
      ex:hasLine ex:line1 .

ex:line1 rdf:type owl:NamedIndividual ;
       ex:hasPage ex:page1 .

ex:newspaper1 rdf:type owl:NamedIndividual .

ex:page1 rdf:type owl:NamedIndividual ;
       ex:hasChapter ex:chapter1 .

==================================

Basically it is a line like   john -> line1 -> page1 -> chapter1 -> book1  and I propagate the "writesBook" property until it gets to John. This is easier to see in Protege than here.

If you put this in Protege, run Hermit, you can see that it is inferred that john writesBook book1, as expected.

If you put it in a Stardog database, then you can do:

SELECT ?s ?o {
  ?s ex:writesBook ?o .
  }

and the expected RESULT (amongst a few others) should be:  ex:john  ex:book1
However, I don't get this in any reasoning regime. In this small example, I could see that EL did actually propagate the initial chain, but didn't get to john.

Then if you add the following file, the expected result is obtained with RL,SL, etc.

example_add.ttl
====================================================
====================================================


I hope I didn't make any mistake while creating the example.

It is actually not a problem for me to create an additional "self" axiom to get this work, but just wondering if it was supported in Stardog at all. Thanks!

Zachary Whitley

unread,
Apr 18, 2016, 11:53:06 AM4/18/16
to Stardog
That looks great. It will be interesting to see if it's the same problem that I just submitted a bug report for or it's something different. Not necessarily related to the problems your're seeing but you might want to give that Stardog version a refresh. The current version is 4.0.5

Jeremy Iron

unread,
Apr 18, 2016, 11:58:11 AM4/18/16
to stardog
Thanks. Stardog is updated so often that I usually find myself running to chase the latest version....

Zachary Whitley

unread,
Apr 18, 2016, 4:58:20 PM4/18/16
to Stardog
For the example you gave I get the same error as I had mentioned previously and in the bug report I submitted

Not a valid SL axiom: EquivalentClasses(d:Book, self(d:RolifBook))

Updating the database to use the EL reasoning profile returned the correct results that you were looking for.

I'm guessing the difference that we're seeing is due to the different version so upgrading to 4.0.5 and using EL should get you going until the Stardog folks get a fix (Assuming it's a bug and I'm not just missing something) and thanks to their frequent releases that you mentioned you shouldn't have to wait very long :)


Jeremy Iron

unread,
Apr 19, 2016, 3:55:31 AM4/19/16
to stardog
You are probably right!  Thanks for your interest and help!!

Zachary Whitley

unread,
Apr 19, 2016, 8:32:54 AM4/19/16
to Stardog
Quick follow up. I just noticed there was a warning in the logs for the EL query. I haven't seen this warning previously.

WARN  2016-04-18 16:51:59,862 [SPEC-Server-1-3] com.complexible.stardog.reasoning.blackout.ViewAtomToPlanNode:transformView(100): Unsupported cycle or rule for property http://www.example.com/d#writesBook
WARN  2016-04-18 16:51:59,862 [SPEC-Server-1-3] com.complexible.stardog.reasoning.blackout.ViewAtomToPlanNode:transformView(101): Rewriting:
http://www.example.com/d#writesBook_VIEW(x0, x1) <- http://www.example.com/d#writesBook(x0, x1)
http://www.example.com/d#writesBook_VIEW(x0, x1) <- http://www.example.com/d#hasLine(x0, x2) ^ http://www.example.com/d#writesBook_VIEW(x2, x1)
http://www.example.com/d#writesBook_VIEW(x0, x1) <- http://www.example.com/d#hasPage(x0, x2) ^ http://www.example.com/d#writesBook_VIEW(x2, x1)
http://www.example.com/d#writesBook_VIEW(x0, x1) <- http://www.example.com/d#Book(x1) ^ http://www.example.com/d#hasBook(x2, x1) ^ http://www.example.com/d#hasChapter(x0, x2)


Jeremy Iron

unread,
Apr 19, 2016, 9:13:02 AM4/19/16
to stardog
I see... perhaps that is what is not applied in SL  :-?

By the way - you were right, Stardog 4.0.5 brings some excellent things, especially a massive performance improvement!

Zachary Whitley

unread,
Apr 19, 2016, 9:22:27 AM4/19/16
to Stardog
I think it may be a separate issue. The restriction on cycles is documented for rules [1] but I suppose the same applies for property paths as well.

[1] http://docs.stardog.com/#_rule_limitations_gotchas
Reply all
Reply to author
Forward
0 new messages