Hello:
When I look at OWL constraint axioms (e.g., the constraint defined below, from Stardog documentation), they seem to appear only when talking of data integrity. We are trying to figure out if those constraints apply also during reasoning (when running Sparql, for example).
As an example: we want to infer a relationship (e.g, via propertychainaxiom). You define a cardinality restriction on the max number of (the inferred) properties per object and expect that sparql + reasoning would not get any result on the inferred property if it violates the cardinality constraint. However, naive tests are failing and we are getting inferred relationships that break down the axiom.
A mock implementation below
model:Team a owl:Class .
model:assigned_to a owl:ObjectProperty ;
rdfs:domain model:Employee ;
rdfs:range model:Team .
model:Employee a owl:Class .
model:scheduled_for a owl:ObjectProperty ;
rdfs:domain model:Team ;
rdfs:range model:Project .
model:Project a owl:Class .
model:works_on a owl:ObjectProperty ;
rdfs:domain model:Employee ;
rdfs:range model:Project ;
owl:propertyChainAxiom ( model:assigned_to model:scheduled_for ) .
[
a owl:Restriction ;
rdfs:subClassOf model:Employee ;
owl:maxQualifiedCardinality 1 ;
owl:onClass model:Project ;
owl:onProperty model:works_on
] .
I would like to limit the number of works_on properties I infer on an employee
My question: Am I conceptually wrong and reasoning does not take into account cardinality constraints? Or am I missing something in my implementation/setup
Changing the type of reasoning from SL to DL did not work. I have also read, in more generic OWL references, that a reasoner may not consider two instances different unless explicitly specified. Not sure if that's behind the issue.