Select Under Counts in Presance of Reasoning


As many of you know, I have a data set which is the genealogies of particular people form early Ireland. I was doing some searching for the ancestors of a particular person so I ran the query below against my data with Stardog 7.1.0 and I was specifically looking at this file with Reasoning turned on (and sameAs Full, punning on):

prefix rel: <>
prefix foaf:  <>

select ?a
from <tag:stardog:api:context:all> 
where {
    ?a rel:ancestorOf <úCulaind>

This query returned 25 results:


If you look in the file, you will notice that #Lir-46304844 is the same as #Lir and as such the results should contain #Nelruaid. This is one specific example but there are plenty more missing. As an aside, I also ran the following query:

prefix rel: <>

select ?o
from <tag:stardog:api:context:all> 
where {
    <> rel:childOf ?o

This returns the expected outcome 2: and

This could be because I do not understand RDF Datasets well enough to know how that effects reasoning but even without that, there are missing individuals who should be in the result set.

I am happy, as always, to share a dump of the database if needed.

Thank you for your time.

So, I had a chance to try this against an alternative to Stardog and it reports back 332 results, which is much closer to what I was expecting and it includes the URLs which I was expecting from Stardog. This means that I believe there is a very real bug in the way in which Stardog deals with this situation. I hope someone can look at this soon because I would think this is effecting other users as well as myself.

I haven't had a chance to look at this yet. I need to find some time to sit down, download your dataset and understand it a bit but I can point you in the direction that I would start looking first. My first guess would be that it's only returning a single url for each individual. SameAs reasoning will pick a random url out of the several possible urls for an individual and use that as the canonical url for that thing. So if you had a dateset with :satchmo and :Louis_armstrong you're result will only contain one or the other depending on which one was picked but not both.

Thanks! Yeah, it can be time consuming to sit down and sort through these things. Yes, I know that owl:sameAs relations are materialized and one is chosen as the "canonical" URL. That is not the problem: the problem is expected URLs like and are not in the result set. These are not in any owl:sameAs triple as these URLs are unique to the particular genealogy so I do not believe it is a misunderstanding of owl:sameAs materialization.

Thanks. That gives me somewhere to start digging. I'll let you know if I find anything but like you mentioned maybe it's just a bug.

Hi Everyone,

I have been away from this project for a bit due to life events but I came back to try the newest Stardog (7.2) to see if this was still a problem but sadly, it is. I am still getting this as a problem. There output of the query from the original post using 7.2 is the same (using sameAs FULL and Punning).

As an aside, I used Ontotext's GraphDB on the same query and I am getting expected results which is why I believe this is a bug with Stardog and not a bug with my query or my understanding.

I would be happy to provide a dump of the database and answer any questions that you may have.