Blank Node Test with OWL Reasoning

David Booth
27-May-2015

In our FHIR RDF work, we ran into an issue in which OWL reasoning did not appear to be working when we used a blank node instead of a URI for a particular node.  This was confirmed with multiple reasoners.  However, based on some experiments that I did yesterday, it looks like we have finally worked out this issue.  According to my tests, the reasoning works fine with blank nodes, but Protege and DL queries do not *show* the results if they are blank nodes instead of URIs.  

In a test file (available in Turtle without line numbers or with line numbers) :confirmed1 and _:confirmed2 are declared exactly the same way on lines 23-24, except that :confirmed1 is a URI and _:confirmed2 is a blank node.  When we look in Protege 5.0 beta at the inferred members of class fhir:AllergyIntoleranceStatusConfirmed after running the reasoner (HermiT 1.3.8.3), only :confirmed1 is shown:
:confirmed1 is inferred
But appearently the reasoner *does* know that _:confirmed2 is also a member of class fhir:AllergyIntoleranceStatusConfirmed, because lines 38-48 cause :up2 to be inferred to be a member of class fhir:ConfirmedUpward *if* _:confirmed2 is a member of class fhir:AllergyIntoleranceStatusConfirmed.   And when we look in Protege at the inferred members of fhir:ConfirmedUpward, :up2 is shown:
Both :up1 and :up2 are inferred

The conclusions is that OWL reasoning does seem to work when blank nodes are used instead of URIs, but Protege and DL queries (and perhaps other tools) may not *show* blank node results.  In contrast, SPARQL queries do return blank node results.