Expand description
Rewrite rules (EXODIA Groups 1–3) with KERNEL-CHECKED soundness certificates (D11b): the compiler’s e-graph is a sibling of the proof engine, not a stranger.
§Soundness discipline
Three obligations gate every rule, and all three fail closed:
- Type: a rule fires only when the operand kinds are PROVEN
(literal nodes or Oracle facts). Float operands never rewrite —
-0.0 + 0.0 == +0.0already breaksx + 0 → xbit-for-bit. - Error/effect preservation: a rule that DELETES a subterm (stops
it being evaluated) requires
CompilerEGraph::provably_total—(a / b) * 0 → 0would erase the divide-by-zero. Short-circuit forms (false ∧ x → false) are exempt for the RIGHT operand only, because the runtime never evaluates it either. - Value: the identity itself carries a certificate checked through
logicaffeine_kernel:Certificate::Ring— polynomial identity via the kernelringtactic. Ring identities with integer coefficients hold in EVERY commutative ring, in particular ℤ/2⁶⁴ = wrappingi64.Certificate::BoolCases— exhaustive Bool case analysis: both sides are built as CIC terms over Match-definedand/or/notand normalized BY THE KERNEL for every valuation.Certificate::Bitvector— wrapping/shift identities outside the ring fragment, exhaustively checked on the adversarial i64 boundary grid. The full Z3 bitvector theorem lands with the Forge SMT layer (M15); this grid is the standing mechanical check.
Structs§
Enums§
- Bool
Expr - A tiny boolean expression language evaluated through kernel normalization (Match-defined connectives over the prelude’s Bool).
- Certificate
- Ring
Expr - A tiny polynomial expression language reified into the kernel’s
ringtactic syntax.
Functions§
- all
- verify_
all_ with_ kernel - Check every rule’s certificate through the kernel. Returns the number of verified rules; the first failure aborts with the rule’s name.