Funny results from Stardog 4.2

1 view
Skip to first unread message

justforthe...@gmail.com

unread,
Oct 26, 2016, 7:06:32 AM10/26/16
to Stardog
I have recently migrated from 4.0.5 to 4.2 in my Linux machine. After the change I think I was getting different results from 4.0.5 to 4.2, but I did not notice anything different, perhaps they were subtle due to my queries. The issue started when I installed 4.2 from scratch in a Windows machine, loaded the same data that were in my Linux, and got different results from my queries. I compared them both and I could only see that the Windows Web access had a "Strict Parsing" and "Preserve BNode identifiers" that the Linux one didn't (under http://localhost:5820/#/databases/mydb). That was strange.

Then I started checking my queries. At the beginning I thought the issue came from a different treatment of the "inverse" and "self" features. When I move the database from the Linux computer directly into the Windows computer I also got different results than those I got from loading the data. So there must be something in my Linux database that I did not migrate properly, even though I tried to use the "migrate" option.

Then I traced down some of the strange things I saw and after some hours of testing I could get an example for you to reproduce that looks funny. It is very simple... I am not sure I am doing anything wrong, but I can't find my mistake. So these are the example data:

@prefix : <http://www.ex.com/d#> .
@prefix ex: <http://www.ex.com/d#> .

:microsoft rdf:type :Institution .
:microsoft rdf:type owl:NamedIndividual .
:project rdf:type :SmallProject .
:project rdf:type owl:NamedIndividual .
:microsoft :participatesIn :project .
:project :conductsTask :task1 .

:usesOffice rdf:type owl:ObjectProperty ;
              rdfs:range :Office ;
              owl:propertyChainAxiom 
                                     ( :conductsTask
                                       :usesOffice
                                     ) .

:Office rdf:type owl:Class .
:Institution rdf:type owl:Class .



This was working before my upgrade to 4.2. If something conducts a task that uses an office, it is also considered to use an office:
conductsTask(x,y) ^ usesOffice(y,z) -> usesOffice(x,z)

Because of the range, it is inferred that :microsoft is an office (always with reasoning ON, under SL):

SELECT ?o
WHERE {
  :microsoft rdf:type ?o
               }

RESULTS:
o
 owl:Thing


Moreover, anything is an office:

SELECT ?o
WHERE {
  :whatever_doesntexist rdf:type ?o
               }

RESULTS:
o
 owl:Thing



I have tried a reasoner externally to double check and I don't get this unexpected result.
Is there something I am missing? Why it worked and now it does not?


Stephen Nowell

unread,
Oct 26, 2016, 10:27:00 AM10/26/16
to sta...@clarkparsia.com
Hi,

Thanks for the well-written bug report! I can confirm that this is a bug that is present in 4.2, and we have created internal ticket #3219 to address it. It will be fixed in an upcoming release.

As a temporary workaround, if you use :usesOffice in an assertion (even a fake one such as [:FakeProject :usesOffice :FakeOffice]), then the false [?x rdf:type :Office] assertions will no longer show up.

Cheers,
-Stephen
--
-- --
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

justforthe...@gmail.com

unread,
Oct 26, 2016, 10:38:55 AM10/26/16
to Stardog, ste...@stardog.com
Great to know and great to be helpful!

I think I will roll back to 4.0.5 until the issue is resolved.

Thanks.
Reply all
Reply to author
Forward
0 new messages