OWL 2 RL Conformance Baseline (v0.48.0)

This page documents the OWL 2 RL conformance baseline for pg_ripple v0.48.0, as measured against the OWL 2 RL rule suite. The CI gate was upgraded to required at ≥ 95% in v0.48.0 (previously informational).

Summary

CategoryRules TestedPassingXFAILNotes
cls (class axioms)12120Full pass
prp (property axioms)18171prp-spo2 (complex chain) XFAIL
cax (class axiom entailments)880Full pass
scm (schema entailments)14131scm-sco (cyclical subclass) XFAIL
eq (equality reasoning)1091eq-diff1 with owl:differentFrom XFAIL
dt (datatype reasoning)431dt-type2 (xs:double precision) XFAIL
Total6662493.9% pass rate

New in v0.48.0

The following OWL 2 RL rules were added or completed:

  • cax-sco: Full rdfs:subClassOf transitive closure (previously single-step only)
  • prp-spo1: rdfs:subPropertyOf full chain (previously binary case only)
  • prp-ifp: Inverse-functional-property derived owl:sameAs propagation
  • cls-avf: Chained owl:allValuesFrom interaction with subclass hierarchy
  • owl:minCardinality, owl:maxCardinality, owl:cardinality entailment rules

Known Failures (XFAIL)

These failures are documented in tests/owl2rl/known_failures.txt and tracked release-to-release for regression detection.

prp-spo2 — Complex sub-property chain

OWL 2 RL rule prp-spo2 requires owl:propertyChainAxiom with two hops. pg_ripple supports two-hop chains but the standard test case uses a three-hop chain that requires recursive sub-property expansion not yet implemented.

Impact: Low — three-hop chains are rare in practice. Target: v0.49.0

scm-sco — Cyclical subclass entailment

The test graph contains a subclass cycle (A rdfs:subClassOf B, B rdfs:subClassOf A). pg_ripple's WFS-based Datalog engine handles this correctly but the OWL 2 RL test harness expects a specific owl:equivalentClass entailment that our inferencer does not currently emit.

Impact: Low — owl:equivalentClass assertion from subclass cycles is a non-essential derived fact for most workloads. Target: v0.49.0

eq-diff1 — owl:differentFrom combined with owl:sameAs

The test requires detecting inconsistency when a node is asserted both owl:sameAs and owl:differentFrom another node and emitting the resulting owl:Nothing entailment. pg_ripple detects the inconsistency (emits PT550 WARNING) but does not propagate the owl:Nothing conclusion to the triple store.

Impact: Very low — inconsistency detection is present; the inferred owl:Nothing is rarely queried directly. Target: v0.50.0

dt-type2 — xs:double precision rounding

The OWL 2 RL test for xs:double datatype entailment requires "1.0E0"^^xsd:double to be recognised as equal to "1"^^xsd:integer under numeric promotion rules. pg_ripple's dictionary encodes each literal verbatim and does not currently perform XSD numeric promotion on store.

Impact: Low — affects only mixed-type numeric comparison assertions. Target: v0.51.0 (XSD numeric tower)

Pass Rate History

VersionPassing / TotalPass Rate
v0.46.0n/a (suite added)
v0.47.062 / 6693.9%
v0.119.066 / 66100% (propertyChainAxiom prp-spo2 now passing)

owl:propertyChainAxiom Support (v0.119.0)

OWL 2 RL rule prp-spo2 (owl:propertyChainAxiom) is now fully implemented.

A chain axiom of the form:

ex:ancestor owl:propertyChainAxiom ( ex:parent ex:parent ) .

is compiled at inference time into a Datalog chain rule:

ancestor(X, Z) :- parent(X, Y), parent(Y, Z).

Cycle safety is guaranteed by PG 18's WITH RECURSIVE … CYCLE clause, which uses hash-based cycle detection rather than a separate visited-set join.

Ten canonical pg_regress tests

The suite tests/pg_regress/sql/owl_property_chain_axiom.sql covers:

  1. FOAF foaf:knows 2-hop acquaintance chain
  2. SKOS skos:broaderTransitive closure
  3. PROV-O prov:wasInfluencedBy derivation chain
  4. 3-hop family chain (parent/parent/sibling)
  5. Multiple concurrent chain axioms
  6. Chain combined with owl:inverseOf
  7. Cycle safety (no infinite loop)
  8. FOAF foaf:knows 3-hop acquaintance chain
  9. rdfs:subPropertyOf combined with owl:propertyChainAxiom
  10. LUBM-style indirectAdvisor chain

Running the Suite

# Requires: cargo pgrx start pg18 first
cargo pgrx regress pg18 -- tests/pg_regress/sql/owl2rl_*.sql

Or with the justfile recipe:

just test-regress

The known-failure list is maintained in tests/owl2rl/known_failures.txt. Any regression (a previously-passing test now failing) is a blocking CI failure regardless of the overall pass rate.