Inference vs validation
Two tools, two questions
- OWL answers 'what else is true?' under the Open-World Assumption. It is designed to infer new facts.
- SHACL answers 'does this graph conform to my expectations?' under the Closed-World Assumption. It is designed to validate against a shape.
Concrete example
Assertion: :Person owl:Class ; rdfs:subClassOf [ owl:onProperty :hasEmail ; owl:minCardinality 1 ].
- If your dataset includes
:alice a :Personwithout:hasEmail, OWL says nothing wrong — it merely infers Alice must have some email, we just haven't been told. - SHACL with
sh:minCount 1on:hasEmailwill fail validation — that's exactly the data-quality check you wanted.
The production pattern
- Use OWL to define meaning and derive inferences.
- Use SHACL at the ingest boundary to validate that incoming data fits the shapes your downstream services expect.
- Run the reasoner first (so inferences are visible), then the validator.