Limits are explicit
Terms, facts, rounds, derivations, lists, paths, and consistency reports have caller-visible limits. Nothing silently truncates.
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.
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 }
A focused inference layer for application-owned RDF
Designed for integration
The core keeps the expensive and consequential choices visible: how much work is allowed, when derived facts become visible, and what evidence supports them.
Terms, facts, rounds, derivations, lists, paths, and consistency reports have caller-visible limits. Nothing silently truncates.
Materialization works on a clone and commits inferred facts only after a successful fixpoint within configured limits.
Each newly inferred fact retains its first rule ID and ordered supporting fact IDs for inspection and debugging.
The API owns an in-memory, set-semantics graph; applications retain responsibility for persistence, lifetimes, and transport.
Implemented OWL false rules return an owned report of fact-ID evidence after successful closure, rather than erasing facts.
The core uses only odin-rdf. odin-sparql appears only in the optional immutable snapshot adapter.
Deliberately documented surface
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
Deliberately separate
Quick start
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.
# 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-sparqlOne RDF toolchain, distinct responsibilities
The three repositories are deliberately composable. The reasoner is a middle layer: it does not replace RDF I/O or become a SPARQL engine.
01 / odin-rdf
RDF 1.1 I/O
Terms, Turtle, N-Triples, N-Quads, and streaming-first parsers and writers.
02 / odin-reasoner
Bounded closure
Indexed facts, forward chaining, provenance, and limited RDFS / OWL inference.
03 / odin-sparql
SPARQL 1.1 Query
A bounded, dataset-agnostic query engine over the optional immutable closure snapshot.
Inspect the ledger
Read the exact RDFS and OWL rule profiles before choosing the closure your application needs.