Verification for the part of Elixir/OTP that can carry a proof.
Repository description: Three-layer formal verification suite for Elixir/OTP/BEAM: sequential pure subsets with TINI + MPR R5 non-interference, choreographic K-CUT GenServer protocols, and Idris2 QTT ABI + verified Zig NIFs under MaxPlus 1 ms scheduler bounds, backed by Z3, CVC5, Alethe proof checking, and ECHIDNA mutation gates.
Topics (20): hyperpolymath · open-source · epistemic-computing ·
epistemic-infrastructure · equivalence-aware-computing · typed-provenance ·
veridical-computing · formal-verification · elixir · beam · otp ·
zig · idris2 · smt-solving · proof-certificates ·
choreographic-programming · session-types · noninterference ·
max-plus-algebra · maximum-principal-reduction
Quintessence is a three-layer formal verification suite for Elixir/OTP. It proves three properties the standard BEAM toolchain does not:
-
Layer A (Sequential subset) — pure functions satisfy their
@pre/@postcontracts for all valid inputs, terminate along an explicit@measure, and preservesecret-typeslattice TINI non-interference. -
Layer B (OTP / GenServer protocol layer) — processes claim remote state commitment only across proved two-party
K-REPLYcausal round-trips (choreographic-typesY-6/Y-8), never across asynchronouscast/send, under bounded mailbox occupancy and supervision epoch restarts (k = 12BMC). -
Layer C (Native NIF boundary) — Zig/Rustler NIFs satisfy C1—C12 safety obligations, match their reproducible binary SHA-256 receipt at load time, and satisfy
MaxPlus ⇐ 1,000 usfor normal BEAM schedulers (or declareschedule: :dirty_cpu).
|
Important
|
Current implementation state ( |
Elixir source
| G0 deterministic macro & purity firewall (`Q-101`..`Q-108`, `Q-206`)
v
| G1 subset checker + Face elaborator
v
Core Spec IR (`qir/v1`, RFC 8785 JCS content-addressed, Idris2 QTT model)
|------------------+-------------------+-------------------+
v v v
Layer A Layer B Layer C
QF_UFLIA / QF_BV K-CUT + k=12 BMC Idris2 ABI / Zig C1-C12 / MaxPlus
| | |
+---------+--------+---------+---------+
v
Z3 + CVC5 + Native Alethe Proof-DAG Kernel -> 6-Kind Mutation (>= 95%)
v
TrustLevel 4 Warrant/Receipt -> batch Coq + Lean -> Level 5 Receipt| Path | Contents |
|---|---|
Engineering execution blueprint, |
|
Full architectural specification: pipeline, |
|
Sequential subset grammar, refinements, typing rules, Why3/SMT projection, TINI non-interference, and G0a—G0c firewall. |
|
Proved two-party fragment, GenServer Face, |
|
Idris2 QTT ABI, Rustler rules, alloc-free Zig core, C1—C12 receipt schema,
and tropical |
|
Warrant/Receipt JCS schemas, trust ladder, ECHIDNA dispatch, Alethe/Dedukti certificates, vacuity V1—V5, and 6-kind mutation scoring. |
|
Phased roadmap (Phases 0—6), WP-01..WP-27 work breakdown, gates, and metrics. |
|
|
Native Zig 0.17 verifier engine ( |
|
Elixir package ( |
|
Architectural rationale is recorded in ADR-0004.
just build # build libquintessence.so + CLI
./src/interface/ffi/zig-out/bin/quintessence doctor # check Z3, CVC5, Zig, Alethe kernel
./src/interface/ffi/zig-out/bin/quintessence verify examples/quintessence
just test # 10 Zig unit tests + 15 E2E cases
just validate # RSR structure, deed, AI guideWhen Elixir/Mix is installed alongside the native binary:
mix quintessence.doctor
mix verify examples/quintessence --strict
mix quintessence.explain Q-401For AI agents working in or extending this repository: read
quintessence_chora.deed, CLAUDE.md, and docs/status/ROADMAP.adoc first,
then follow docs/AI_INSTALLATION_GUIDE.adoc
and docs/architecture/REPOSITORY-MAP.adoc.
Code is Mozilla Public License 2.0 (MPL-2.0); documentation and
prose are CC-BY-SA-4.0. Every file carries an explicit SPDX-License-Identifier
header.