Skip to content

Core Concepts

Subsumption is the core reasoning operation. Class A subsumes class B when B is a subclass of A (directly or transitively).

In OWLGraph, type(A) matches all nodes typed as B because the materializer writes A onto every B node at insert time. You don’t write JOIN logic or UNION queries — the database handles it.

Animal subsumes Mammal subsumes Dog subsumes GoldenRetriever

Query type(Animal) → returns GoldenRetrievers, Dogs, Cats, Birds, and everything else in the hierarchy.

Rather than computing type hierarchies at query time (which gets expensive), OWLGraph materializes inferred facts during mutation processing.

When you write dgraph.type = "GoldenRetriever", the engine adds Dog, Mammal, and Animal as additional type edges on the same node — before the data reaches storage.

Why this matters:

  • Reads are fast — type(Animal) is a simple index lookup
  • No query-time reasoning overhead
  • Consistent results regardless of query complexity

The materializer applies these rules in order on every mutation:

RuleTriggerEffect
Delete cascadesType removed from nodeAncestor types also removed
Type hierarchydgraph.type setAll superclass types added
Domain inferenceProperty with rdfs:domain usedDomain type added to subject
Range inferenceProperty with rdfs:range usedRange type added to object
Inverse propertiesProperty with owl:inverseOf usedReverse edge created
Symmetric propertiesSymmetric property usedReverse edge with same predicate
Property chainsChain axiom matches in batchDerived edge created
Disjointness checkAfter all inferenceMutation rejected if violated

All inferred edges carry an owl.inferred=true facet so you can distinguish asserted from inferred facts.

OWLGraph implements the OWL2 RL (Rule Language) profile. This is the OWL profile designed for materialization-based reasoning with polynomial-time complexity.

What’s supported:

  • Class hierarchies (rdfs:subClassOf)
  • Property domains and ranges (rdfs:domain, rdfs:range)
  • Property characteristics (transitive, symmetric, functional, inverse functional, reflexive, irreflexive, asymmetric)
  • Inverse properties (owl:inverseOf)
  • Property chains (owl:propertyChainAxiom)
  • Disjoint classes (owl:disjointWith)
  • Class expressions (intersection, union, complement, some/all values from, has value)
  • Equivalent classes (owl:equivalentClass)

What’s not supported (by design):

  • Full OWL DL tableau reasoning
  • Open-world assumption reasoning
  • Nominals (enumerated classes)
  • Cardinality restrictions

The RL profile is the sweet spot for real-world applications — it handles the class hierarchies, property reasoning, and type inference that 95% of ontology-driven applications need, without the computational complexity of full DL reasoning.

If a single mutation would generate more than 10,000 inferred edges, materialization is aborted and the mutation is rejected. This prevents runaway inference in pathological ontologies.

When an ontology is loaded into a cluster that already contains data, OWLGraph triggers a background process that scans existing nodes and adds missing ancestor type edges. This runs asynchronously and doesn’t block the ontology load response.