Shared Register Context, Retained Witnesses, and Active-Epoch Prologues #
Provides the shared parameter-free register space Fin rEpoch, retained RealizesBounded .exact
subroutine witnesses, ABI register conventions, InEpochValid / 1 · OPT inEpochPeakWords
specifications, CompactedSplitRep frame lemmas, and verified active-epoch context-loading and
quotient-hash evaluation subroutines (loadActiveCtxCode, evalKeyHashCode) consumed by
Dispatch.lean (in-epoch operations) and epoch migration.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.rEpoch,eReg,rBase..rMicro,hpReg,cpReg,inEpochFactor: parameter-free register bank and combined exchange factor.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.loadActiveCtxCode,evalKeyHashCode: parameter-freeRCode .exact rEpochactive-epoch parameter loader and key-hash evaluator.Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.encode,argMatch,decode,opKey,InEpochValid,inEpochPeakWords,inEpochPotential,inEpochBaseCharge,inEpochCharge: ABI, admissibility, peak-space, potential, and amortized charge definitions.
Main results #
inEpochPeakWords_le_succinctWords:inEpochPeakWordsis bounded by1 · OPTsuccinct words.loadActiveCtxCode_exec,runEvalHashAtQuot,evalKeyHashCode_exec: deterministicRDemonicExeccertificates reconstructingx.frontierand evaluatinghValOfSeed.
References #
Section 1: Retained RealizesBounded Witnesses, Register Layout, and Exchange Factor #
RealizesBounded witness for computing compacted item word count compItemWordsGenProg.
RealizesBounded witness for 3-wise quotient-hash evaluation evalHashGenProg.
RealizesBounded witness for in-epoch compacted query compQueryWithHashGenProg.
RealizesBounded witness for split-insert Phase 1 search compInsertSearchWithHashGenProg.
RealizesBounded witness for split-insert value overwrite compWritePhysValGenProg.
RealizesBounded witness for insert grow-delta calculation compGrowDeltaGenProg.
RealizesBounded witness for split-insert Phase 2b append compInsertAppendNewGenProg.
RealizesBounded witness for split-delete Phase 1 search compDeletePrepWithHashGenProg.
RealizesBounded witness for split-delete Phase 2 finish compDeleteFinishWithHashGenProg.
RealizesBounded witness for delete shrink-delta calculation compShrinkDeltaGenProg.
Combined parameter-free scratch register bank size across the eleven RealizesBounded
subroutines used in in-epoch operation dispatch.
Parameter-free register budget 88 + scratchEpoch for in-epoch resizable succinct dispatch
(0..24 fixed working/ABI registers, 32..50 HashParams, 52..87 CompParams, 88..
scratch).
Persistent base-address register 0.
Hardware frontier tracking register 1.
Operation tag input register 2 (0 = query, 1 = insert, 2 = delete).
Input key register 3 (u.val).
Input value register 4 (v for insert, 0 otherwise).
Output presence tag register 5 (0 = none, 1 = some).
Output value register 6 (v if found, 0 otherwise).
Word count delta register 7 for growZeroCode / shrinkCode.
Result pointer register 8 for growZeroCode.
Current address / temporary offset register 9.
Loop index / offset scratch register 10.
Constant-0 scratch register 11.
Constant-1 scratch register 12.
Active element count n register 13.
Compacted item-stream base address base + offCompItems register 14.
Quotient-hash base address base + epochHdrWords register 15.
Limb-scratch base address base + offScratch register 16.
Extracted quotient input register 17 for evalHashGenProg.
Evaluated hash output register 18 from evalHashGenProg.
Saved primary hash value h_q register 19 across two-phase deletion.
Bucket search found flag register 20.
Deletion logical slot index j_del register 21.
Resolved physical slot index phys register 22.
Feistel bucket index b register 23.
Micro-bucket index m register 24.
Register bank 32..50 holding the 19 words of RuntimeReducedKWise.HashParams.
Register bank 52..87 holding the 36 words of CompParams.
Combined parameter-free exchange factor ≥ 1 dominating all eleven RealizesBounded
subroutines.
Section 2: Generic Register-Wiring Combinators and Emitted Subroutines #
Register-bank encoding predicate decoupled from syntactic WordEncoding.width equality.
Scratch-and-output register map placing l outputs in outs and the remaining s + 1
temporaries consecutively starting at baseOff + l inside Fin r.
Output and scratch register wiring for wInsSearch (writing rFound, rPhys, rBucket,
rMicro).
Output and scratch register wiring for wWriteVal.
Input register wiring (cp, n) for wGrowDelta.
Output and scratch register wiring for wGrowDelta (writing rK).
Output and scratch register wiring for wInsAppend.
Output and scratch register wiring for wDelFin.
Input register wiring (cp, n) for wShrinkDelta.
Output and scratch register wiring for wShrinkDelta (writing rK).
Section 3: Offset Memory Primitives and Active-Epoch Prologues #
Load mem (regs rAddr + off) into rDst using rTmp as scratch (3 instructions).
Store regs rSrc into mem (regs rAddr + off) using rTmp as scratch (3 instructions).
Active-epoch prologue (0 < n): loads HashParams and CompParams from [base + 8, +55),
evaluates compactedItemWords U V w N n via wItemWords, and populates rScratchBase,
rHashBase, rItemBase, and rFr = x.frontier.
Extract q = keyQuotient (bucketBits N) u into rQuot and evaluate h_q into rHashOut.
Section 4: Register Disjointness and Prologue Width-Independence (¬ReadsWidth) #
Section 5: ABI Encoding, InEpochValid, 1 · OPT Peak Space, Potential, and Charges #
Standalone register encoding for Dynamic.Op U on Fin rEpoch.
Partial argument-matching predicate for callers of inEpochOpCode.
Output decoder reading Option ℕ from (rOutTag, rOutVal) for .query and () for
.insert / .delete.
Extract the target key u : Fin U of a dynamic dictionary operation.
Necessary and sufficient condition for o : Dynamic.Op U to execute within the current epoch
of capacity N without triggering an epoch capacity migration: o is a valid dictionary operation
and the post-step cardinality remains valid for epoch N.
Exact peak epoch word footprint across an in-epoch operation o, equal to
compactedEpochWords U V w N (max n n') where n' is the post-step live key count.
Stepwise 1 · OPT peak word-space bound (inEpochPeakWords_le_succinctWords):
under EpochValid U n N and InEpochValid V N s_abs o, the peak hardware word footprint above
base never exceeds Dynamic.succinctWords 1355 441 U V w (max n n') (1 · OPT).
Scaled slab/tail hysteresis potential (98 * inEpochFactor) * slotPotential for in-epoch
operations on the Resizable Word RAM.
Parameter-free base instruction charge before adding (12 * inEpochFactor) * probeExcess
(evalMemBound 3 = 45151, so two hash evaluations plus bucket/slot updates cost at most
90800 * inEpochFactor + 230 instructions).
Parameter-free $O(1)$ expected amortized instruction charge per in-epoch operation under a
uniform QuotHashSeed U N (5 bounds expected probeExcess, 12 * 5 = 60).