Search code examples
rdfreasoningallegrograph

Allegrograph reasoning


I'm getting familiar with RDF stores on example of Allegrograph. One of part I'm interested in is reasoning. I've taken an example from here: https://franz.com/agraph/support/documentation/6.4.3/agraph-introduction.html and trying to make it working. From the graph it seems following logical chain:

  1. "Has Pet" predicate is applicable to "Mammal" objects. E.g. if there is a triple predicate there will be another another triple rdf:type inferred. It's defined by triple rdfs:range
  2. "Has Pet" predicate is a subproperty of "Owns". E.g. if there is a triple there will be another triple inferred. It's defined by triple rdfs:subPropertyOf
  3. "Owns" predicate is applicable to "Human" objects. E.g. if there is a triple there will be another triple rdf:type inferred. It's defined by triple rdfs:domain

So I've created a graph shown in the Franz web page.

s,p,o 
"test://Animal","rdf:type","rdf:class"
"test://Mammal","rdfs:subClassOf","test://Animal" 
"test://Dog","rdfs:subClassOf","test://Mammal" 
"test://hasPet","rdfs:range","test://Mammal" 
"test://hasPet","rdfs:subPropertyOf","test://owns" 
"test://owns","rdfs:domain","test://Human" 
"test://owns","rdf:type","rdf:Property"  
"test://petOf","owl:inverseOf","test://hasPet"
"test://Robbie","test://petOf","test://Jans" 
"test://MrAasman","owl:sameAs","test://Jans"

I expected from this data at least two facts to be inferred:

  1. Robbie is a mammal
  2. Jans is a human

But it didn't come to that. I can't say that reasoning didn't work at all. At least I saw:

  • Jans has pet Robbie
  • Jans owns Robbie
  • MrAasman has pet Robbie
  • MrAasman owns Robbie
  • Dog is an animal

Why it doesn't infer types? Is it expected behavior?


Solution

  • This is not expected behavior. AllegroGraph's dynamic RDFS++ reasoner appears to be missing some inferences that can be made by following chains of subProperties and inverses.

    I've filed a bug (bug25588) for you with Franz and am working on a fix which will appear in v6.5.0.

    In the meantime, you can use the Materializer to find all of the inferred triples. You can do this in AGWebView or via one of the client APIs. If you have additional questions, the best thing to do is to email allegrograph-support@franz.com so that we can create a support ticket.

    We weren't able to get these fixes into AllegroGraph v6.4.5. If you file a support request with us, we can make sure to notify you when v6.5.0 is released.