RDFS Core OWL 2 RL seed MIT

Reason RDF.
Keep the boundary.

A bounded, forward-chaining reasoner for Odin. Materialize application-owned RDF through a small RDFS Core profile and an explicitly scoped OWL 2 RL seed—without inheriting a graph store or network policy.

6
RDFS Core rules
48
Direct OWL seed rules
Bounded
Explicit work limits
examples/rdfs_materialize/main.odin
import rdfs "../../reasoner/rdfs"
import store "../../reasoner/store"

target: store.Store
store.init(&target)
defer store.destroy(&target)

// Parse input through the owned-term sink.
// Then derive a bounded RDFS closure.
profile: rdfs.Profile
rdfs.init(&profile, &target)
defer rdfs.destroy(&profile)

result := rdfs.materialize(&profile, &target)
if result.error != .None { return }
✓ indexed matches · ✓ transactional closure · ✓ first-support provenance

A focused inference layer for application-owned RDF

Set semanticsForward chainingProvenanceStrict RDF listsNo hidden I/O

Designed for integration

Closure without a hidden policy.

The core keeps the expensive and consequential choices visible: how much work is allowed, when derived facts become visible, and what evidence supports them.

01 / bound

Limits are explicit

Terms, facts, rounds, derivations, lists, paths, and consistency reports have caller-visible limits. Nothing silently truncates.

02 / commit

Closure is transactional

Materialization works on a clone and commits inferred facts only after a successful fixpoint within configured limits.

03 / explain

Supports are retained

Each newly inferred fact retains its first rule ID and ordered supporting fact IDs for inspection and debugging.

04 / own

Facts stay yours

The API owns an in-memory, set-semantics graph; applications retain responsibility for persistence, lifetimes, and transport.

05 / report

Inconsistency is evidence

Implemented OWL false rules return an owned report of fact-ID evidence after successful closure, rather than erasing facts.

06 / separate

Dependencies stay directional

The core uses only odin-rdf. odin-sparql appears only in the optional immutable snapshot adapter.

Deliberately documented surface

Small rules. Honest claims.

RDFS Core is exactly six rules. The OWL profile is an explicit 48-rule static seed supplemented by four list-dependent paths. The linked ledgers define the real product boundary.

Read the OWL profile →

Included

  • RDFS subclass, subproperty, domain, range, transitivity
  • OWL hierarchy, property, schema, value, equality, and functional rules
  • `oneOf`, intersection, union, and property-chain list materializers
  • First-support provenance and selected inconsistency reports

Deliberately separate

  • Complete RDFS or OWL 2 RL conformance
  • Named graphs and RDF datasets
  • Persistent storage and transactions
  • Network loading, endpoints, or automatic I/O
  • Core dependence on SPARQL

Quick start

Supply facts. Reach a fixpoint.

Point Odin's `odin-rdf` collection at the sibling RDF checkout. The end-to-end example reads a Turtle file, materializes RDFS Core, and prints asserted and inferred facts.

terminal
# materialize RDFS Core from Turtle
odin run examples/rdfs_materialize \
  -collection:odin-rdf=../odin-rdf \
  -- example.ttl

# validate the core
odin check reasoner -no-entry-point \
  -collection:odin-rdf=../odin-rdf
odin test reasoner \
  -collection:odin-rdf=../odin-rdf

# optional closure snapshot for odin-sparql
odin test adapter/sparql \
  -collection:odin-rdf=../odin-rdf \
  -collection:odin-sparql=../odin-sparql

One RDF toolchain, distinct responsibilities

Start with terms. Add closure. Query the snapshot.

The three repositories are deliberately composable. The reasoner is a middle layer: it does not replace RDF I/O or become a SPARQL engine.

Inspect the ledger

Use the inference you can name.

Read the exact RDFS and OWL rule profiles before choosing the closure your application needs.