propertyChainAxiom not being inferred

Hi! I have a special case where I want to infer properties inherited from parent entities. Looking at a similar case, where inference results were showing in protege but not in stardog. I am using stardog cloud and cannot read the logs to debug the property chain axiom. Also tried with stardog rules to no avail. I made a demo example of my scenario.

cat-demo.ttl (3.7 KB)

The specific rule:

###  http://example.com#hasFeature
:hasFeature rdf:type owl:ObjectProperty ;
            rdfs:subPropertyOf owl:topObjectProperty ;
            owl:inverseOf :isFeatureOf ;
            rdfs:domain :Order ;
            rdfs:range :Feature ;
            owl:propertyChainAxiom ( :inheritsFrom
                                     :hasFeature
                                   ) .

Example query - it is only returning features from 'cat' but ignoring 'feline' and 'mammal' features. While I can achieve the same with traversal, the idea is to simplify it by just asking for features and get all the inherited ones.

PREFIX example: <http://example.com#>

SELECT ?feature ?featureValue
WHERE {
  example:Cat example:hasFeature ?feature .
  ?feature example:value ?featureValue .
}

What am I missing here?

Thanks for the support, Pura Vida!

Hi Alexis,

you need to make sure to load the ontology (T-Box) into the schema graph. The data about individuals (A-Box) can go into the default graph.

I split your example into two files:
cat-data.ttl (1.5 KB)
cat-schema.ttl (3.7 KB)

You can add cat-data.ttl to the default graph and cat-schema.ttl to the schema graph as defined per reasoning.schema.graphs (see also in the docs). The default schema graph is tag:stardog:api:context:schema.
You can do this via the CLI or in Studio via Load Data. See the example screenshots:

Running the query you provided with reasoning enabled yield 3 results:

Best regards,

Lars

1 Like

Thanks! That worked exactly as expected. Also appreciate the explanation and the example of the solution. I was missing the T-Box / A-Box distinction when importing the data.

1 Like