Skip to content

Reduce packed tape read/write access from 30 to 17 instructions (no new κ) - #4883

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w10-1022l-packed-tape-fusion
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
petalas:research/w10-1022l-packed-tape-fusion

Conversation

@petalas

@petalas petalas commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A retained read reduces a packed tape's read/write access from the separately emitted 30 instructions to 17, with a four-instruction write commit.

- GET: 13 instructions; independent SET: 17 instructions
+ READ: 13 instructions; retain address, offset, word and old symbol
+ COMMIT: xor, shiftl, xor, store

Claim type: scoped construction proof with finite corroboration. For k distinct tapes, all reads precede all writes, and the access bill is exactly 17k. The dispatcher must preserve the cached observations and packed data. Arbitrary neighboring fields and high padding are preserved. This is a local constant improvement; no optimality, full packed compiler, physical supplier, multiplication theorem or new κ is claimed.

This contribution is produced by Nick Petalas. Credit Dugongue's #4538 for the packed representation, GET/SET baseline and complete-backend open question, and its retained RamStd/Problem 1.8 compiler lineage. The XOR identity is standard; the contribution is the explicit simultaneous-read cache contract, emitted schedule and scoped instruction saving. #4541, #4630 and #4724 remain separate window-simulation, native-assembly and portfolio context.

Evidence

  • Before: Word RAM transfer: finite TM compiler, checked logarithmic-width bridge and native kernels #4538's cited 13-instruction GET plus 17-instruction SET gives 30 instructions per tape. Its results are used as predecessors, not audit deliverables.
  • After: generated source-bound receipt reports 592,308 exhaustive scalar identity cases, 6,000 emitted multi-tape fragments, 1,598,000 executed access instructions, twelve invalid-input rejections and four semantic controls. A literal two-tape swap dispatcher executes 36 instructions including its two dispatch instructions.
  • Warning-strict normal and optimized checks passed locally in 2.191 and 2.205 seconds. Registered replay, committed-byte/source-history preflight, standalone optimized replay and committed export/integrity checks passed. Source and numeric-receipt corruptions reject.

From the repository root:

/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -B research/packed-tape-fusion/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -W error -O -B research/packed-tape-fusion/verify.py
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/research_package.py --package research/packed-tape-fusion
/Users/nick/git/integer-mult-bounds/.venv/bin/python3.12 -B scripts/check_research_commit.py --package research/packed-tape-fusion --check-source-history

Use another host's CPython 3.12 path when needed. Standard library only. The universal claim rests on the written field-replacement and non-aliasing proof; finite fixtures corroborate it.

Limitations: initialization, head preparation/motion, dispatch, input/output and whole-machine halting remain separately charged. The new emitter supports at most 64 tapes and 256-bit replay words, while the written identity covers every finite k and word width satisfying its contract. Cache invalidation, same-word multiple selected fields, full compiler integration and Lean refinement are unrun obligations. There is no measured hardware speedup or selected-frontier change.

Related open work

The completion refresh inspected all 61 open PRs on this account. Ten were created since the CLAIM, including this PR; the other nine were #4873, #4874, #4875, #4876, #4878, #4879, #4880, #4881 and #4882. None studies this retained-read packed-RAM access contract or computes its instruction bill, so no additional same-object entry or numerical disagreement was found in that coverage. No predecessor computations were rerun.

The following nearby writeback work uses a different machine and tariff:

Open next questions

  1. Install the cache slabs in one complete packed finite-control compiler, starting with one actual dispatcher transition and retaining all head/IO/halt costs.
  2. Specify a multi-field same-word caller and determine a live-word/cache policy. The present distinct-tape non-aliasing contract does not permit intervening data writes.

CI notes

Both hosted checks passed for head 4be95e7135920931a58ab09a8b5b5487c9d6f3ca in run 39867631350: planning in 3m01s and registered package replay in 1m21s. Run metadata confirms this exact head, completed status and success. The completion checks were read once. Registered replay executes both warning-strict normal and optimized commands. Every registered command and publication preflight also passed locally; no check was deferred solely to CI. Hosted execution certifies the bounded replay checks, not independent human or formal proof-kernel acceptance.

Merge danger

Two-way door. Blast radius: isolated. Only the new research package is added; shared code, predecessor sources and selected-frontier files are unchanged.

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.

2 participants