The Ouroboros Engine — A high-performance Rust implementation of the
n/language, featuring lattice-based convergence, call-by-observation lazy evaluation, content-addressed evaluation, and federated truth discovery.
nlang-tools is the primary implementation of the n/ (n-slash) language. It realizes the Ouroboros architecture, where computation is defined as the monotonic merging of geometric structures (Combos) within a globally consistent lattice.
Versioning: the engine shares its major.minor with the language spec (meta/VERSIONING.md there); a bare-core release (no pre-release tag) certifies REAL_05 conformance. Bare-core since v0.2.0; v0.2.2 passes the extended matrix 48/48 (L1-26/27 forward references + L1-28 union idempotence) (conformance/ corpus + scripts/run-conformance.py in the spec repo).
This repository is a Rust Workspace containing the core engine crates:
crates/parser: AST definition and Pest-based grammar, fully synced to the finalized SYNTAX_01–12 / SPEC_14 grammar. Golden-AST vectors + seeded fuzz roundtrip guard against silent deformation; semantic canonicalization backs deterministic CAID generation.crates/interpreter: The core Unification Engine. Call-by-observation laziness (thunks, live refs, observation memo, per-coordinate incremental invalidation), the Trinity Isomorphism, resource-bounded observation, and LADD (Lattice-Aware Distributed Discovery) routing.crates/oo: The Ouroboros CLI — run, eval, evolve, commit, refine, fmt, serve, andlint(contextuality linter, Tier 1).docs/: Architecture, implementation status, roadmap;docs/worknotes/holds per-feature work orders and acceptance records.tests/: n/-language test corpus (the authoritative Rust suite lives in each crate'stests/).
cargo build --release# Lattice meet: ranges are closed interval sets — not loops
./target/release/oo eval '5 & 1..10' # → 5 (membership)
./target/release/oo eval '1..10 & 5..20' # → 5..10 (intersection)
./target/release/oo eval '(1 | 7) & 1..3' # → 1 (superposition distributes)echo 'name: "Alice", age: 30..40' > profile.n
./target/release/oo evolve profile.n
# Refine a declared possibility space monotonically
echo 'age: 33' > refine.n
./target/release/oo evolve refine.n
./target/release/oo status
./target/release/oo commit -m "Genesis profile"./target/release/oo repl- Call-by-Observation: fields hold thunks; values solidify only when observed. Live references (
<<path>>) dereference against the current universe at observation time. Observation memo + per-coordinate invalidation give incremental convergence (GUIDE_03 §11). - Two comparison families: atomic
==/!=absorb_|_/_(lattice extremes propagate); set-family=,<,<=,>,>=return clean booleans (_|_is the empty set, an operand — not a black hole). - Resource-bounded observation: every evaluation is fuel/depth/timeout-bounded; exhaustion collapses honestly to
#blurhorizons or_|_per the observation strategy. - Contextuality Linter:
oo lintcomputes the context graph, clique number ω(G), and K4/K5 candidate sites (Tier 1: graph-theoretic, no obstruction claims). - LADD Routing: discover and assemble truth across nodes via
~%Discovery; conflicts resolve by information density. - Semantic Formatting:
oo fmtnormalizes structurally identical code to the same CAID.
# Full Rust suite: 762 passed / 0 failed / 3 ignored (113 suites)
cargo test --workspaceProbe/redline test files (*_probe_test.rs, *_redline_test.rs) are pre-committed acceptance probes promoted to permanent regression guards — do not weaken them.
Dual-licensed under MIT and Apache-2.0.
"Lattice initialized. Convergence is inevitable."