From: Fedja A. <ad...@ad...> - 2015-03-09 13:05:03
|
Hello dotNetRDF Team, I am using the current dotNetRDF version from NuGet (1.0.7.3471) and am experiencing something that appears to be a bug in SPARQL Query evaluation. Consider the following RDF Database: [ Link ] <http://pastebin.com/2aYNdZ7j> It describes the relationship between sheep and wolves in the context of a fairytale. There are no other data sources, these are all existing triples, a total of seven. I am querying this tiny database using SparqlQueryParser, InMemoryDataset and LeviathanQueryProcessor. Now consider the following queries: [ Query A ] <http://pastebin.com/T73SVdBY> retrieves the subject URIs of everything that is a Sheep. As expected with this dataset, the result is only Frame:Sheep itself, but it could be specific kinds of sheep in different datasets. [ Query B ] <http://pastebin.com/PMKmgUME> retrieves the subject URIs of everything that a Wolf preys upon. Since a Wolf only has a PredatorOf relationship to Sheep, the expected result would still be only the Sheep URI. Instead, however, the resultset contains /both/ Sheep /and/ Wolf. In fact, the value of ?prey is, as expected, Sheep in both cases, *but **?obj**is Sheep in one of the results, and Wolf in the other*. The first line of the WHERE condition clearly states that ?obj is required to be a ?prey, which is correct when both are Sheep (because a Sheep is a Sheep), *but a Wolf is certainly not a Sheep*. Both are animals, but that relationship goes the other way around. I have verified the above queries with the above database in Protégé <http://protege.stanford.edu/> and get the expected results, which leads me to the conclusion that this is in fact a bug in dotNetRDF. Can I expect a fixed NuGet package anytime soon? Is there a workaround? Regards, Adam |