Bounded approximants of an unbounded loop #
whileApprox guard body n runs body at most n times, continuing while
guard holds of the current heap, and fails when the budget is exhausted. It is
the finite unrolling whose limit denotes while guard do body: the mass
whileApprox guard body n assigns to a heap is the probability of reaching that
heap and leaving the loop within n iterations.
Failure at zero is what makes the sequence increasing in n: a run that has not
yet left the loop contributes no mass, so extending the budget can only add mass
at a value, never move it.
The loop itself is the limit of this sequence, which is developed separately; this file fixes the approximants and their defining equations.
The n-step approximant of while guard do body: run body while guard
holds, for at most n iterations, and fail if the budget runs out.
Equations
- One or more equations did not get rendered due to their size.
- CatCrypt.NonUniform.whileApprox guard body 0 = CatCrypt.Core.SPComp.fail