0x0LearnReferenceLibraries0x0.jmp0x1b.com

Equality Saturation And Superoptimization

Equality saturation and superoptimization are bounded research lanes for

discovering optimizer candidates. They are not default compiler behavior.

research output is separated from default compilation until a candidate is

promoted into an ordinary deterministic compiler rule with validation,

differential, benchmark, ADR/RFC, and documentation evidence.

Run the bounded evidence gate with:


make eqsat-superoptimization-check

This gate validates source-owned rewrite domains, e-graph budgets, extraction

cost models, candidate equivalence, offline proposal intake, promotion

evidence, diagnostics, negative fixtures, and release reports. It does not run

heavy compiler builds, self-hosting, remote deployment, broad benchmark suites,

or online model calls.

Domains

Supported research domains live in eqsat-superopt/domains.tsv:

Each domain is disabled by default and names an explicit target surface:

HIR, MIR, LIR, or MachineIR.

Rewrite And Extraction Budgets

Rewrite sets live in eqsat-superopt/rewrite-sets.tsv. Each set must declare:

Extraction costs live in eqsat-superopt/extraction-costs.tsv. Cost models

must have stable objectives and source-order tie breaking.

Candidate Validation

Candidate fixtures use 0x0-eqsat-candidate-v1 JSON and are checked by:


python3 tools/eqsat_candidate_eval.py --candidate eqsat-superopt/fixtures/valid-add-zero.json

The evaluator exhaustively checks the finite input domain for supported

candidate expressions and rejects:

Proposal Intake

LLM-guided proposals are allowed only as offline candidate generation. Online

LLM calls are not allowed in compiler, release, or gate paths. Proposal intake

lives in eqsat-superopt/llm-proposal-intake.tsv.

Promotion

A validated candidate is not a production compiler rule by itself. Promotion

requires:

The current promoted candidate is arith-add-zero, because the deterministic

optimizer-fold-int-identity rule already exists in compiler/main.0x0.

Other validated candidates remain research-only.

Release Evidence

Release evidence lives in:

Diagnostics

The gate reports stable diagnostics:

Negative fixtures under eqsat-superopt/fixtures/ prove fail-closed behavior

for non-equivalence, budget excess, bad extraction cost, online LLM intake, and

promotion without evidence.