Expand description
OWL 2 RL forward-chaining materialization over NQuin-style triples.
This is the reasoner companion to super::shacl_convert (which only
lowers OWL vocabularies into SHACL shapes). Here we compute the OWL 2 RL
entailment closure of a triple set by datalog-style fixpoint iteration — the
standard PTIME approach to OWL 2 RL — using only fixed caller-supplied buffers
(zero heap; no Vec/Box). Three audit capabilities live here:
- OWL 2 RL partial materialization — the property/class-axiom rule subset
that needs no RDF-list decoding:
cax-sco,prp-spo1,prp-dom,prp-rng,prp-symp,prp-trp,prp-inv,prp-fp,prp-ifp,eq-sym,eq-trans,scm-sco,scm-spo, plus equivalence expansion (scm-eqc/scm-eqp), iterated to a fixpoint. This is the polynomial-time core of OWL 2 RL. - Disjointness contradiction isolation (
cax-dw) — a violating individual is recorded into a quarantine buffer and the closure keeps going. An inconsistency does NOT explode the graph into “everything entailed”; the rest of the Information-Banking ecosystem stays usable off-grid. - Property-chain axiom unrolling —
p ⊑ p1 ∘ p2is composed by the sparse boolean-relation product (the join form of a boolean matrix multiply), supplied as explicitChainAxioms (the internal form an N3/OWL parser produces fromowl:propertyChainAxiom (p1 p2)).
§Complexity
Each fixpoint pass scans a stable prefix of the bounded working set and inserts
deduplicated derivations into the tail; iteration stops at a fixpoint or a caller
max_iters cap. With a working set bounded by the caller’s buffer this is
polynomial and terminates — suitable for constrained hardware.
Structs§
- Chain
Axiom - A 2-step property chain axiom
composed ⊑ first ∘ second. An OWL/N3 parser lowerscomposed owl:propertyChainAxiom (first second)into this form. - Disjointness
Violation - A recorded
cax-dwdisjointness contradiction:individualwas inferred to be a member of twoowl:disjointWithclasses. Reported, not fatal. - Materialize
Summary - RdfTriple
- A reasoning triple — the
(subject, predicate, object)projection of an NQuin.Copyand 24 bytes, so working sets live entirely in caller stack/arena buffers.
Enums§
Constants§
- OWL_
DISJOINT_ WITH - OWL_
EQUIVALENT_ CLASS - OWL_
EQUIVALENT_ PROPERTY - OWL_
FUNCTIONAL_ PROPERTY - OWL_
INVERSE_ FUNCTIONAL_ PROPERTY - OWL_
INVERSE_ OF - OWL_
SAME_ AS - OWL_
SYMMETRIC_ PROPERTY - OWL_
TRANSITIVE_ PROPERTY - RDFS_
DOMAIN - RDFS_
RANGE - RDFS_
SUBCLASS_ OF - RDFS_
SUBPROPERTY_ OF - RDF_
TYPE
Functions§
- materialize_
owl_ rl - Compute the OWL 2 RL entailment closure of
triples[..initial_len]in place.