Ontology hosting & lifecycle¶
epistemic-graph is an ontology server: it hosts OWL/RDFS ontologies, maps them onto the property
graph, and reasons over them in-engine with the OWL 2 EL⁺/RL reasoner (eg-rdf/owl). Reasoning is
pure-Rust (no horned-owl, no whelk-rs) and adds two things most triple-stores don't: confidence
weighting and Ebbinghaus time-decay of derived facts.
Status snapshot: EL⁺ + RL classification, consistency, incremental materialization, confidence weighting, time-decay, distributed reasoning, the OWL-DL tableau (cardinality,
allValuesFrom,owl-dlfeature), SWRL user rules (swrlb:built-ins) andrdfs:rangecompletion are all supported (EG-KG.ontology.owl-reasoning/059/060) — the EL/RL fast path stays the default. See the capability matrix.
The lifecycle¶
flowchart LR
LOAD["1. Load<br/>OWL/RDFS as RDF"] --> MAP["2. Map<br/>onto the property graph"]
MAP --> REASON["3. Reason<br/>EL⁺/RL fixpoint closure"]
REASON --> QUERY["4. Query<br/>SPARQL / REASON / SQL"]
QUERY --> EVOLVE["5. Evolve<br/>incremental add_axioms"]
EVOLVE --> REASON
1–2. Load & map¶
Load triples (AddTriples) or a Turtle/RDF document; the engine maps subjects/objects to nodes,
resource triples to typed edges, and literals to properties (see the SPARQL/RDF guide).
3. Reason¶
The reasoner saturates the ontology to a monotone fixpoint:
- OWL 2 EL⁺ completion — the named completion rules (CR-sub, CR-conj, CR-some±, CR-chain, CR-subrole,
CR-bot, CR-disjoint) compute subsumers
S(A)and role relationsR(r). This reaches concept-level entailments (e.g.HumanHeart ⊑ HumanComponentthrough∃partOf.Body) that a plain RL/Datalog pass cannot. - OWL 2 RL property rules —
subPropertyOf, property chains, transitive/symmetric/inverse properties,rdfs:domain(lifted to EL∃r.⊤ ⊑ D). - Consistency — any satisfiable class forced to subsume
owl:Nothingflags the ontology inconsistent. - Confidence weighting (EG-KG.ontology.concept-13) — a per-axiom
eg:confidenceannotation propagates as a noisy-OR (MAX over derivations ofaxiom_conf × ∏ premise_conf). - Ebbinghaus time-decay — derived facts decay by
conf · exp(−ln2 · age / half_life)againstnow − last_access(GRAPH_SERVICE_DECAY_HALF_LIFE, default 7 days).
Materialization is incremental: add_axioms keeps the prior S/R and resumes the fixpoint,
provably equal to a from-scratch run. Reasoning runs single-graph (Method::OwlReason) or distributed
across shards (Method::OwlReasonDistributed), unioning TBox + ABox into one weighted closure.
4. Query¶
- SPARQL over the materialized graph (see the SPARQL guide).
REASON <Class>as a UQL source — theOp::Reasonop (underowl-plan) seeds a RowSet with the inferred members of a class, which then composes with traversal, vector rank, etc.:
type edges and properties like any other graph data.
5. Evolve¶
Add or retract axioms and re-run the incremental closure; confidence and decay keep the derived set honest about how strong and how fresh each inference is.
Scope¶
- Default envelope: OWL 2 EL⁺ + RL forward-chaining (the fast path).
rdfs:rangeis enforced in completion (EG-KG.ontology.owl-reasoning). - Full DL: the
owl-dlfeature adds a pure-Rust DL tableau (cardinality,allValuesFrom, nominals, negation) run consistency → classification → instance, plus SWRL user rules with theswrlb:built-in library (EG-KG.ontology.concept-2/060). These are opt-in beyond the EL/RL default.
Tier note¶
The lean pi tier carries SPARQL SELECT + OWL reasoning via the Method::Owl* RPCs, but the
SQL-backed Op::Reason planner op needs owl-plan (which pulls DataFusion) and lands in the node
tier. See tiers & binaries.
See also: Capabilities matrix · SPARQL & RDF · Cypher & Bolt · Agent Memory · Master-of-all Engine.