oxilite-reason
OWL 2 RL materialization for oxilite with the reasonable reasoner, for native backends.
Website · API docs · Guide and architecture · Changelog and issues
oxilite already reasons in two ways without this crate: per-query RDFS / OWL QL rewriting, and OWL 2 RL materialization as SQL rules that also run on D1. oxilite-reason is the fast path for large native stores: it reads every asserted triple, runs reasonable's Datalog engine in memory and writes the new conclusions into quads_inf, exactly where the SQL rules put theirs. Both give identical results.
Usage
Through oxilite (feature reasonable):
// oxilite = { version = "0.2", features = ["reasonable"] }
use QueryOptions;
let added = store.materialize_with_reasonable?; // store.materialize() uses the SQL rules
let opts = QueryOptions ;
let out = store.query_output?;
Or over any SyncBackend: oxilite_reason::materialize(&backend) stores the closure, oxilite_reason::infer(&backend) only returns it.
Materialized inferences are not maintained: re-run it after changing data, or clear them with clear_inferences(). The whole dataset must fit in memory, so D1 stores use the SQL rules instead. See Reasoning and validation.
The oxilite family
oxilite is an Oxigraph-compatible RDF database and SPARQL 1.1 engine that stores its data in SQLite, so it runs anywhere SQLite runs: in-process, on a system or vendor libsqlite3, on Cloudflare D1 and in Durable Objects. The same data can be queried with SPARQL and openCypher, reasoned over with RDFS / OWL, and validated with SHACL and ShEx. Read the overview on oxilitedb.com and the full guide in the main README.
| Package | What it is for |
|---|---|
oxilite |
The store: a drop-in for oxigraph::store::Store, plus AsyncStore for D1 |
oxilite-core |
The sans-IO core: term encoding, schema, SPARQL → SQL compiler and planner |
oxilite-rusqlite |
In-process backend with a bundled SQLite (the default) |
oxilite-dylib |
Backend that loads your own libsqlite3 at runtime |
oxilite-d1 |
Cloudflare D1 backend for Rust Workers |
oxilite-cypher |
openCypher over the same data, OWL- and SHACL-aware |
oxilite-reason |
OWL 2 RL materialization with reasonable |
oxilite-validate |
SHACL and ShEx validation with rudof |
oxilite-cli |
The oxilite command and a SPARQL endpoint like oxigraph serve |
@oxilite/node |
Node.js bindings, API of Oxigraph's JS package |
@oxilite/d1 |
Cloudflare D1 and Durable Objects from TypeScript (WebAssembly core) |
@oxilite/common |
RDF/JS terms and shared TypeScript types |
License
Dual-licensed under MIT or Apache-2.0, at your option, like Oxigraph.