Memory Layout, Runtime Parameter Block, and Representation Invariants for SuccinctWhp #
This module defines the concrete Word-RAM word layout within
[base, base + whpSpace c U V w n_max),
the 68-word runtime parameter vector WhpCoreParams (paired with the two HashParams vectors into
the 100-word WhpParams input record), and the
concrete memory representation invariants (SmallMemRep, CsrMemRep, BTreeSliceMemRep,
BufTrieMemRep, FastMemRep, SeedWhpMemRep, and WhpMemRep) linking Word-RAM memory x.mem to
the pure state machine WhpDictState of SuccinctWhpModel.
Main definitions #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.WhpCoreParams,WhpParams,mkWhpCoreParams,mkWhpParams: runtime parameter tuples for parameter-freeRealizes .exactsubroutines.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.SmallMemRep,CsrMemRep,BTreeSliceMemRep,BufTrieMemRep,FastMemRep,SeedWhpMemRep,WhpMemRep: concrete Word-RAM memory representation predicates across.small,.fast, and.fallbackmodes.
Main results #
Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.smallOffsets_eq,largeOffsets_eq,largeOffsetChain: exact segment accounting and adjacent offset chain matchingsmallSpaceWhpandlargeSpaceWhp.Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.fits_mkWhpParams: every word ofmkWhpParamsfits inwbits whenever0 < w,n_max ≤ U,Fits w U,Fits w V, andFits w (base + whpSpace c U V w n_max).Cslib.DataStructure.Dictionary.WordRAM.SuccinctWhp.WhpMemRep.congr_footprint: frame invariance ofWhpMemRepunder memory changes outside[base, base + whpSpace c U V w n_max).
Section 1: Header slots and segment word offsets #
Header slot 0: active regime tag (0 = .small, 1 = .fast, 2 = .fallback).
Header slot 1: fs.poolFreeTop.
Header slot 2: fs.curEp (0 or 1).
Header slot 3: fs.epochClock.
Header slot 4: fs.rebStage (0 .. 5).
Header slot 5: fs.stageCursor.
Header slot 6: fs.dirtyCount.
Header slot 7: fs.dirtyIdx.
Header slot 8: fs.rebCandSalt.
Header slot 9: fs.rebScanCursor.
Header slot 10: fs.rebInsCount.
Header slot 11: fs.rebCollision.
Header slot 12: (fs.buf 0).nodeAlloc.
Header slot 13: (fs.buf 0).itemAlloc.
Header slot 14: (fs.buf 1).nodeAlloc.
Header slot 15: (fs.buf 1).itemAlloc.
Small-regime occupancy array offset (base + 32).
Small-regime packed keys array offset.
Small-regime packed values array offset.
Word count of θ.1 : BktSeed c U n_max (BitPackedDoubleTabulation.space).
Word count of θ.2 : FpSeed c U n_max (BitPackedDoubleTabulation.space).
Large-regime bucket-hash block offset (base + 32).
Large-regime fingerprint-hash block offset.
Large-regime Feistel quotients array offset (n_max entries of quotBitsWhp U n_max bits).
Large-regime values array offset (n_max entries of valBits V bits).
Start of the 13 auxiliary packed arrays in largeAuxWordsWhp.
2-bit per-coordinate location tag array (M * totalLocalCoordsWhp n_max entries).
Per-bucket scalar metadata and slice (alloc, root) array (16 * M entries of
globalPtrBits n_max bits).
CSR bucket prefix-sum array fbStart (M + 1 entries of globalPtrBits n_max bits).
Backyard pointer directory backPtr (M * capBackWhp n_max entries of globalPtrBits n_max
bits).
Auxiliary backyard scratch array (M * capBackWhp n_max entries of 12 * logLogFactor + 4
bits).
Backyard free-slot stack poolFreeStack (poolSizeWhp n_max entries of globalPtrBits n_max
bits).
Backyard reverse owner array poolOwner (poolSizeWhp n_max entries of globalPtrBits n_max
bits).
SWAR B+-tree node metadata array (totalBTreeNodesWhp n_max entries of nodeMetaBitsWhp n_max
bits).
SWAR B+-tree node keys-word array (totalBTreeNodesWhp n_max entries of keysWordBitsWhp n_max
bits).
SWAR B+-tree node vals-word array (totalBTreeNodesWhp n_max entries of valsWordBitsWhp n_max
bits).
Total child-pointer entries maxTrieNodesWhp c n_max * 2 ^ bCharWhp n_max per buffer
trie.
Epoch buffer 0 trieChild array (trieChildEntriesWhp c n_max entries of
globalPtrBits n_max bits).
Epoch buffer 1 trieChild array.
Epoch buffer 0 per-node metadata array (6 * maxTrieNodesWhp c n_max entries of
globalPtrBits n_max bits; 4 * u + 0..3 store nodeParent, nodeChar, nodeLeafItem,
nodeActive).
Epoch buffer 1 per-node metadata array.
Epoch buffer 0 item log (0 .. 3 * qEpoch - 1) + dirtyBuckets
(3 * qEpoch .. 4 * qEpoch - 1) array (6 * qEpochWhp n_max + 6 entries of globalPtrBits n_max
bits).
Epoch buffer 1 item log array (6 * qEpochWhp n_max + 6 entries of globalPtrBits n_max
bits).
Complete adjacent segment-offset chain for largeSpaceWhp, allowing omega to discharge
cross-segment disjointness and footprint bounds without unfolding the individual off*
definitions.
Section 2: Threshold, bit-width, and word-fit inequalities #
Convolution width (4 * tMinWhp n_max) * keyLaneBitsWhp n_max fits strictly inside
Nat.log 2 n_max whenever whpThreshold c ≤ n_max.
Memory representation of SmallDictState at base (mem[base] = 0).
Memory representation of CsrState at base (mem[base] = 2).
Memory representation of a single SWAR B+-tree slice sIdx = 3 * b + role < 3 * M on its
allocated prefix 0 .. sl.alloc - 1.
Memory representation of epoch buffer trie ep ∈ {0, 1}.
Memory representation of FastState at base (mem[base] = 1).
Memory representation of the two static double-tabulation seeds (θ.1, θ.2) in the large
regime.
Combined memory representation linking θ and st : WhpDictState to mem across all
capacities n_max.
SeedWhpMemRep depends only on [base + offHashBkt, base + offQuotWhp c w n_max).
Pure footprint invariance of WhpMemRep: depends only on memory words in
[base, base + whpSpace c U V w n_max).
Core 68-word runtime parameter vector for SuccinctWhp Memory.Prog subroutines.
Instances For
Combined 100-word runtime parameter bundle (coreParams, (bktHashParams, fpHashParams)).
Construct WhpCoreParams for (c, U, V, w, n_max). When n_max < whpThreshold c, all
large-regime entries (10 .. 67) are 0 so every entry fits in w bits for all w > 0.
Construct the full 100-word WhpParams bundle for (c, U, V, w, n_max).
Bucket-hash runtime parameter block in WhpParams.
Fingerprint-hash runtime parameter block in WhpParams.
Named projections on WhpCoreParams #
Small-regime flag (1 if n_max < whpThreshold c, 0 otherwise) in WhpCoreParams.
Word width w in WhpCoreParams.
Maximum capacity n_max in WhpCoreParams.
Key universe bound U in WhpCoreParams.
Value universe bound V in WhpCoreParams.
Small-regime key bit-width keyBitsWhp U in WhpCoreParams.
Value bit-width valBitsWhp V in WhpCoreParams.
Small-regime presence bitmap word offset in WhpCoreParams.
Small-regime packed key array word offset in WhpCoreParams.
Small-regime packed value array word offset in WhpCoreParams.
Bucket index bit-width bWhp n_max in WhpCoreParams.
Number of buckets numBucketsWhp n_max in WhpCoreParams.
Bucket index bitmask numBucketsWhp n_max - 1 in WhpCoreParams.
Feistel quotient bit-width quotBitsWhp U n_max in WhpCoreParams.
Bucket fingerprint bit-width fpBitsWhp n_max in WhpCoreParams.
Fingerprint radix 2 ^ fpBitsWhp n_max in WhpCoreParams.
Double-tabulation character bit-width bCharWhp n_max in WhpCoreParams.
Character radix 2 ^ bCharWhp n_max in WhpCoreParams.
Character bitmask 2 ^ bCharWhp n_max - 1 in WhpCoreParams.
Character chunk count cTabWhp c in WhpCoreParams.
Salt domain bound sMaxWhp c n_max in WhpCoreParams.
Buffer-trie item capacity 2 * sMaxWhp c n_max in WhpCoreParams.
Epoch operation length qEpochWhp n_max in WhpCoreParams.
Front-yard slack parameter deltaWhp n_max in WhpCoreParams.
Per-bucket front-yard capacity capFrontWhp n_max in WhpCoreParams.
Per-bucket backyard capacity capBackWhp n_max in WhpCoreParams.
Total per-bucket local coordinate count totalLocalCoordsWhp n_max in WhpCoreParams.
Total front-yard slot count numBucketsWhp n_max * capFrontWhp n_max in WhpCoreParams.
Backyard pool size poolSizeWhp n_max in WhpCoreParams.
Overmars local rebuild threshold 5 * (slabScale n_max) ^ 12 in WhpCoreParams.
Global slot pointer bit-width globalPtrBits n_max in WhpCoreParams.
In-place permutation activity bit-width permActBits n_max in WhpCoreParams.
Per-trie child-pointer entry count in WhpCoreParams.
Per-trie maximum node count maxTrieNodesWhp c n_max in WhpCoreParams.
Maximum SWAR B+-tree height hMaxBTreeWhp in WhpCoreParams.
Minimum SWAR B+-tree branching parameter tMinWhp n_max in WhpCoreParams.
SWAR B+-tree node lane capacity 2 * tMinWhp n_max in WhpCoreParams.
Full-node key count 2 * tMinWhp n_max - 1 in WhpCoreParams.
SWAR key lane bit-width keyLaneBitsWhp n_max in WhpCoreParams.
SWAR key lane bitmask 2 ^ keyLaneBitsWhp n_max - 1 in WhpCoreParams.
Packed SWAR all-ones pattern over 2 * tMinWhp n_max key lanes in WhpCoreParams.
Packed B+-tree value-word bit-width valsWordBitsWhp n_max in WhpCoreParams.
Packed B+-tree key-word bit-width keysWordBitsWhp n_max in WhpCoreParams.
SWAR value lane bit-width valLaneBitsWhp n_max in WhpCoreParams.
SWAR value lane bitmask 2 ^ valLaneBitsWhp n_max - 1 in WhpCoreParams.
B+-tree node metadata bit-width nodeMetaBitsWhp n_max in WhpCoreParams.
Per-slice B+-tree node budget nodesPerSliceWhp n_max in WhpCoreParams.
Word offset offHashBkt of the bucket hash seed in WhpCoreParams.
Word offset offHashFp of the fingerprint hash seed in WhpCoreParams.
Word offset offQuotWhp of the packed quotient array in WhpCoreParams.
Word offset offValWhp of the packed value array in WhpCoreParams.
Word offset offPermAct of the permutation activity array in WhpCoreParams.
Word offset offLocState of the local slot-state array in WhpCoreParams.
Word offset offBktMeta of the bucket metadata array in WhpCoreParams.
Word offset offFbStart of the CSR bucket-prefix array in WhpCoreParams.
Word offset offBackPtr of the backyard pointer array in WhpCoreParams.
Word offset offPoolFreeStack of the backyard free stack in WhpCoreParams.
Word offset offPoolOwner of the backyard pool-owner array in WhpCoreParams.
Word offset offBtMeta of the B+-tree node metadata array in WhpCoreParams.
Word offset offBtKeys of the B+-tree packed key-lane array in WhpCoreParams.
Word offset offBtVals of the B+-tree packed value-lane array in WhpCoreParams.
Word offset offTrieChild0 of epoch-0 BufTrie child pointers in WhpCoreParams.
Word offset offTrieChild1 of epoch-1 BufTrie child pointers in WhpCoreParams.
Word offset offTrieMeta0 of epoch-0 BufTrie node metadata in WhpCoreParams.
Word offset offTrieMeta1 of epoch-1 BufTrie node metadata in WhpCoreParams.
Word offset offTrieItems0 of epoch-0 BufTrie item records in WhpCoreParams.
Word offset offTrieItems1 of epoch-1 BufTrie item records in WhpCoreParams.
Both HashParams vectors satisfy BitPackedDoubleTabulation.HashEnv in the large regime.