Clocked randomized execution and adaptive-adversary expected time on the Resizable Word RAM #
Clocked probabilistic operational semantics, adaptive-adversary fault-freedom, every-step peak
hardware-frontier bounds (PeakFrontierLe), ℝ≥0∞-valued expected running time
(expectedTimeDemonic), and flat-program halting-distribution specifications (ExecRProgramDist)
for the word-granular Resizable Word RAM (Cslib.WordRAM.Resizable).
When a flat program p : RProgram B r executes single-word .grow dst, a time- and state-adaptive
adversary adv : RAdv r (ℕ → RState r → ℕ → ℕ), observing the step index t and the full
current machine state s : RState r, chooses an arbitrary w-bit initial word at address
s.data.frontier (advGrowMem w (advStep s) s.data.frontier 1 s.data.mem). Every flat-program
specification quantifies universally (or takes the supremum in ℝ≥0∞) over all adv : RAdv r.
Main definitions #
Cslib.WordRAM.Resizable.RAdv,Cslib.WordRAM.Resizable.advGrowMem: time- and state-adaptive adversary for newly grown words on.grow.Cslib.WordRAM.Resizable.stepRandResizable,Cslib.WordRAM.Resizable.runRandResizable,Cslib.WordRAM.Resizable.evalRandDemonic: single-step and clockedt-step probabilistic execution inProbCompandPMF.Cslib.WordRAM.Resizable.RDemonicFaultFree,Cslib.WordRAM.Resizable.PeakFrontierLe,Cslib.WordRAM.Resizable.AlmostSurelyHaltsDemonic,Cslib.WordRAM.Resizable.expectedTimeDemonic: fault-freedom, every-step peak hardware-frontier bound, almost-sure halting, and supremum expected instruction count across all adaptive adversaries.Cslib.WordRAM.Resizable.ExecRProgramDist: flat-program execution certificate coupling fault freedom,PeakFrontierLe,expectedTimeDemonic ≤ T, and exact halting-state distributionμ.
Main results #
Cslib.WordRAM.Resizable.ExecRProgramDist.iSup_evalRandDemonic_halted_eq:ExecRProgramDistpins the limiting halting probability of every stateytoμ yunder every adversaryadv.Cslib.WordRAM.Resizable.ExecRProgramDist.almostSurelyHaltsDemonic: everyExecRProgramDisthalts almost surely across all adaptive adversaries.Cslib.WordRAM.Resizable.not_execRProgramDist_halt: a 1-instruction[.halt out]program cannot satisfyExecRProgramDistfor any target distribution assigning positive mass outsidex.
References #
- [KLZ26] William Kuszmaul, Jingxun Liang, and Renfei Zhou, Succinct Dynamic
Rank/Select: Bypassing the Tree-Structure Bottleneck, SODA 2026 (
arXiv:2510.19175v1, Section 5.1, PDF pp. 16–20 / printed pp. 15–19; Theorem 5.2(6) and Footnote 10, PDF p. 18 / printed p. 17). - [MU17] Michael Mitzenmacher and Eli Upfal, Probability and Computing, 2nd ed., Cambridge University Press, 2017, Sections 2.1, 2.3, and 2.4.
Adaptive adversary and clocked randomized execution #
Time- and state-adaptive adversary choosing initial word contents on .grow instructions as a
function of step index t : ℕ, active machine state s : RState r, and word address a : ℕ.
Every advGrowMem instance satisfies DemonicGrow.
Single step of randomized execution of p : RProgram B r at word width w under single-step
growth initializer advStep : RState r → ℕ → ℕ. Halted and faulted configurations are absorbing.
Set of active (.running) configurations.
Set of cleanly halted (.halted) configurations.
Any deterministic transition stepRandResizable w (adv 0) p (.running s) = pure (.running s')
transports supremum halting probabilities from (adv.shift 1, s') to (adv, s).
Fault-freedom, PeakFrontierLe, expected time, and ExecRProgramDist #
Every-step peak hardware-frontier bound: across every adaptive adversary adv : RAdv r, every
horizon t : ℕ, and every reachable configuration cfg (.running or .halted), the active
hardware word frontier never exceeds L_peak.
1-step Bellman equation for expectedStepsWithinAdv.
Flat Resizable Word RAM Distributional Execution (ExecRProgramDist).
Starting at ⟨0, x⟩ at word width w, p : RProgram B r with output register out : Fin r:
- never faults under any adaptive adversary (
RDemonicFaultFree), - keeps the active hardware frontier
≤ L_peakat every step (PeakFrontierLe), - runs in at most
Texpected instructions (expectedTimeDemonic w p ⟨0, x⟩ ≤ T), and - reaches halting distribution
μ : PMF (RData r)across every adaptive adversaryadv.
Zero faults across all adaptive adversaries and horizons.
Hardware frontier stays
≤ L_peakacross all adaptive adversaries and horizons.Supremum expected step count is at most
T.- halted_le (adv : RAdv r) (y : RData r) : μ y ≤ ⨆ (t : ℕ), (evalRandDemonic w adv p t { pc := 0, data := x }) (RCfg.halted (y.regs out) y)
Every state
yis reached at.halted (y.regs out) ywith probability at leastμ y.
ExecRProgramDist implies AlmostSurelyHaltsDemonic and pins the exact limiting halting
probability of every y : RData r to μ y under every adaptive adversary adv : RAdv r.
Every ExecRProgramDist halts almost surely under every adaptive adversary.
Soundness Check (not_execRProgramDist_halt).
A 1-instruction [.halt out] stub cannot satisfy ExecRProgramDist for any target distribution
μ whose support contains a state y ≠ x.
Every RDemonicExec w L_peak c x n P witnesses at least one reachable post-state y
satisfying P y and y.frontier ≤ L_peak.
Compilation of RDemonicExec and ExecRCodeDist to flat RProgram #
Horizon-bounded non-faulting and ≤ L_peak frontier invariant on evalRandDemonic.