P1: onto_owl_shacl_coevolve_check — combined OWL+SHACL validation (K-CAP 2025)
## Why
K-CAP 2025 paper by Ruckhaus, Toledo, Martínez Sarmiento, Corcho — "Lessons Learned from the Combined Development of OWL and SHACL" ([oeg-upm/shacl-owl-kcap-2025](https://github.com/oeg-upm/shacl-owl-kcap-2025)) documents practical patterns for OWL TBox and SHACL shapes evolving together. Open Ontologies has `onto_shacl_check` (#21) for structural SHACL validation against the loaded ontology, but no tool that validates them as a **co-evolving pair** — i.e. checking that the SHACL shapes are consistent with the OWL semantics.
Examples of OWL+SHACL inconsistencies the current `onto_shacl_check` does not catch:
- `sh:targetClass ex:Person` plus `sh:property [ sh:path ex:owns ; sh:class ex:Pet ]` — but the OWL TBox declares `ex:owns rdfs:range ex:Animal`. The shape over-restricts; either the OWL is wrong or the shape is too narrow.
- `sh:minCount 1` on `sh:path ex:hasParent` for `sh:targetClass ex:Person` — but the OWL declares `ex:hasParent` as a non-functional property with no minimum cardinality. The shape adds a constraint not implied by the ontology.
- Disjointness constraint via SHACL `sh:not` that contradicts an OWL `owl:equivalentClass`.
## Scope
Extend `ShaclValidator` (or add a new `OwlShaclCoEvolutionChecker`) that runs alongside `onto_shacl_check`:
1. For each `sh:property` constraint, compare against the OWL domain/range/cardinality of the property
2. Flag:
- `range_overrestriction` — SHACL `sh:class` is a strict subclass of OWL `rdfs:range`
- `cardinality_conflict` — SHACL min/max conflicts with OWL `owl:minCardinality`/`maxCardinality`
- `disjointness_clash` — SHACL `sh:not` over a class that's `owl:equivalentClass` to the target
3. Return categorised issues with rule_id, severity, OWL evidence, SHACL evidence
## Reference
- Paper: K-CAP 2025
- Reference impl: https://github.com/oeg-upm/shacl-owl-kcap-2025
## Priority
**P1** — natural extension of the existing `onto_shacl_check` (#21); reuses the SPARQL + parsing infrastructure already in src/shacl.rs.
0 条评论