Skip to content

Compile compact routing ROMs with direct dense-row queries (no κ) - #6629

Open
petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w1-1102k-scoped-step
Open

petalas wants to merge 1 commit into
CrocSwap:mainfrom
petalas:research/w1-1102k-scoped-step

Conversation

@petalas

@petalas petalas commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add a compact control-ROM compiler and direct dense-layer/wire query adapter for power-of-two permutations.

full distinct-switch Beneš payload: Nh - N/2 bits
compact payload:                   Nh - N + 1 bits
fixed-zero switch records omitted: N/2 - 1

Claim type: constructive implementation and scoped written proof with exact finite corroboration. The Waksman network and its switch count are classical, credited prior work. The new contribution is the concrete flat row serialization, closed address decoder, canonical byte encoding and executable endpoint certificate. Produced by Nick Petalas. No new kappa, frontier change or minimum-network-size claim.

The proof covers every h>=1. The bounded implementation accepts 2 through 4096 wires. A packed query returns the new compiler's dense control without unpacking the payload. Its routing choices can differ from a predecessor's; production CRT intermediate keys require rebuilding.

Evidence

  • Before: the usual distinct-switch layout has twenty control bits at eight wires. After: the compact compiler uses seventeen and preserves every routed input. At 32 wires byte alignment gives seventeen bytes instead of eighteen, with shared framing excluded equally.
  • Every permutation at 2,4,8 wires passes: 40,346 permutations. Thirty-six larger fixtures cover heights 4 through 12. Every compact address is checked against a separately expanded explicit-wire topology.
  • All 2,301,028 executed packed dense queries agree with the explicit control records. Every case checks all labeled endpoints, correlated dirty payloads, input preservation and inverse restoration. Seventeen malformed inputs and seventeen one-bit endpoint mutants reject.
  • The generated JSON receipts bind all seven package files. Warning-strict normal and optimized receipts are identical. Their local complete checks took 4.948s and 4.825s, below their 120-second limits. These are timeout observations, not a speedup claim.
  • Registered package replay, source/metadata pins, exact committed bytes, executable modes, declared source history and whitespace checks pass at 9bc9bbe97f50886abd0d9a2328f6412439be64ab. No predecessor scientific checker is executed.

Exact reproduction from the repository root, with CPython 3.12 and the standard library:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/compact-waksman-row-rom/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -O -B research/compact-waksman-row-rom/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/compact-waksman-row-rom
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/compact-waksman-row-rom --check-source-history --check-modes

Any CPython 3.12 executable can replace the local path. Expected markers are PASS_COMPACT_WAKSMAN_ROW_ROM, PASS_REGISTERED_RESEARCH_PACKAGE and PASS_RESEARCH_COMMIT_BYTES. Default verification prints the generated receipt and writes no files.

Limitations and unrun obligations

Stored payload bits exclude the height, shared framing, input permutation and compiler workspace. Byte padding is charged explicitly; no whole-byte saving is claimed at 4,8,16 wires. Logical dirty-wire restoration is not physical allocator or tape-head restoration.

This is an additive routing-control package. No existing compiler is replaced. Finite-control lowering, complete tape construction/query/disposal costs, changed intermediate CRT keys, native access, owned erasure, stock, precision, hosting and complete caller/outer invoices remain open. All five selected framework assumptions remain. No selected cold replay, Lean, Docker, physical runtime improvement or complete multiplication theorem is claimed. Independent human and formal proof-kernel review are unclaimed.

Credit Abraham Waksman's classical network and corrigendum; ToikY / PR4192 for the charged Beneš compiler context; JoyboyBrian / PR5092 for encoded dense-row production; Cinna Davis / PR4100 and their retained CRT/routing lineage. The source producer is pinned as provenance, neither copied nor imported. The changed card scope is recorded in TASK.json.

Open next questions

  • Lower the four-wire path-first coloring and compact serialization to the encoded CRT producer, charging all instructions, validation, query, disposal, erasure and head returns. A smaller ROM alone does not establish a favorable tape bill.
  • Rebuild one complete CRT caller's intermediate repair keys for the new routing choices and compare its full matched invoice. Final permutation equality does not preserve old intermediate control rows.

Related open work

  • PR4192 gives the charged sequential Beneš compiler/query. This package changes the control representation; it does not claim its encoded lowering or tape bound transfers.

  • PR6611 changes complete-fiber CRT tail staging. Its payload buffer and tape-action quantities differ from these routing-control bits; neither result supplies the other's integration.

  • PR6384 changes a capped-flow mirror-capacity criterion. This package does not alter that compiler invoice or infer a recursive saving from ROM compression.

  • PR6626 compresses sparse-union coordinate/tag headers. Its state domain and metadata-bit counts differ from these permutation-control payloads; no shared numerical quantity is compared.

Completion refresh inspected all fifteen other open account PRs created since the advance CLAIM. None computes this routing-control payload or dense-query quantity, and no conflicting numerical claim was identified. No extra computations were run to check those results.

The live check covered 579 open PR bodies, fresh handoff claims, merged-work queries and main README terms. This is overlap coverage, not proof of novelty or coverage of unpublished work.

CI notes

At head 9bc9bbe97f50886abd0d9a2328f6412439be64ab, run 41650669316 completed successfully. Both hosted checks passed: plan and replay (research/compact-waksman-row-rom). The completed checks were read once, and run metadata confirms the same PR head. This certifies the bounded automated package replay; independent human and formal proof-kernel review remain unclaimed.

Merge danger

Door: two-way.

Blast radius: isolated.

Only research/compact-waksman-row-rom/ is added. No shared compiler, selected result, frozen source or predecessor credit is changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant