Documentation

CslibFrontier.DataStructure.Dictionary.WordRAM.ResizableSuccinct.Migration.Exec.MigrateActive

Single-Tape 1 · OPT Active Epoch Migration (migrateActiveCode) #

Assembles migrateSetupParamsCode, migrateSetupShiftCode, resampleHashCode, and migrateFinishCode into the parameter-free (¬ReadsWidth) native RCode .exact rResize single-tape 1 · OPT streaming rebuild migrateActiveCode, proving its distributional execution and expected potential-amortized instruction bound migrateActiveCode_execRCodeDist.

Main definitions #

Main results #

Parameter-free (¬ReadsWidth) native RCode .exact rResize single-tape 1 · OPT streaming rebuild from (N_old, n, n_init_old) to (targetCap U n, n, n).

theorem Cslib.DataStructure.Dictionary.WordRAM.ResizableSuccinct.migrateActiveCode_execRCodeDist {U V w N_old n n_init base : ℕ} {θ_old : Succinct.QuotHashSeed U N_old} {s_abs : State U} {x : WordRAM.Resizable.RData rResize} (hx : WordRAM.Resizable.RData.Bounded w x) (hn : 1 ≤ n) (hev : EpochValid U n N_old) (hfr : x.frontier = base + compactedEpochWords U V w N_old n) (hfit_peak : WordRAM.Fits w (base + migratePeakWords U V w N_old n)) (hsplit : CompactedSplitRep base (base + offCompItems U w N_old) U V w N_old n n_init θ_old s_abs { mem := x.mem, frontier := x.frontier }) (hbase : x.regs mBase = base) :
have N_new := targetCap U n; have peakF := base + migratePeakWords U V w N_old n; ∃ (zOf : Succinct.QuotHashSeed U N_new → WordRAM.Resizable.RData rResize) (T_mig : ENNReal), WordRAM.Resizable.ExecRCodeDist w migrateActiveCode x (PMF.map zOf (Probability.PMF.uniformOfFintype (Succinct.QuotHashSeed U N_new))) T_mig peakF ∧ (∀ (θ_new : Succinct.QuotHashSeed U N_new), WordRAM.Resizable.RData.Bounded w (zOf θ_new) ∧ (zOf θ_new).frontier = base + compactedEpochWords U V w N_new n ∧ CompactedSplitRep base (base + offCompItems U w N_new) U V w N_new n n θ_new s_abs { mem := (zOf θ_new).mem, frontier := (zOf θ_new).frontier } ∧ (zOf θ_new).regs mBase = base ∧ (zOf θ_new).regs mTag = x.regs mTag ∧ (zOf θ_new).regs mArgU = x.regs mArgU ∧ (zOf θ_new).regs mArgV = x.regs mArgV ∧ ∀ addr < base, (zOf θ_new).mem addr = x.mem addr) ∧ T_mig + ∑' (θ_new : Succinct.QuotHashSeed U N_new), (Probability.PMF.uniformOfFintype (Succinct.QuotHashSeed U N_new)) θ_new * ↑(inEpochPotential U w N_new base (zOf θ_new)) ≤ ↑(migLinearFactor * n)

Distributional Single-Tape 1 · OPT Rebuild (migrateActiveCode_execRCodeDist): From any active compacted epoch (N_old, n, n_init_old) (1 ≤ n, EpochValid U n N_old), migrateActiveCode resamples a fresh uniform QuotHashSeed U (targetCap U n) and streams all n entries into (targetCap U n, n, n) at base without ever exceeding hardware frontier base + migratePeakWords U V w N_old n (≤ base + Dynamic.succinctWords 2699 888 U V w n), bounding expected instructions plus post-migration inEpochPotential by migLinearFactor * n.