Loop rules with footprints
Library · Source module
Loop rules with footprints
Every loop rule here has the standard invariant form: a family of footprints F i (what the first i rounds may write, increasing in i) and a family of postconditions P i. A round is proved from a fresh memory m' with the frame m.store.EqOff (F i) m'.store and P i m', and must write only F (i + 1) from m'; the rule composes the frames. So a round never writes an EqOff chain from the start of the loop, and the invariant never says ∃ s', m' = ⟨s', _⟩.
Main results
* NLAlib.Ops.writes_loop: the counted loop. * NLAlib.Ops.writes_loop₂: two nested counted loops, with an invariant indexed by the row and the column (no quotient or remainder of a linear index). * NLAlib.Ops.writes_fill, NLAlib.Ops.writes_fill₂: a loop (two loops) that fills a vector (a matrix in a layout) one entry per round, with the position of the tape moving; the round only has to prove the one cell it writes. * NLAlib.Ops.writes_fillRel, NLAlib.Ops.writes_fillRel₂: the same when the values are known only by a relation (the outputs of relational calls: gemm, coefficients). * NLAlib.Ops.writes_whileFuel: the loop with early exit. * NLAlib.Ops.writes_ifPos, NLAlib.Ops.writes_ifZero: branches on a size.
Declarations
- NLAlib.Ops.Fp.le_of_chain
- NLAlib.Ops.IExp.evalList_append
- NLAlib.Ops.IExp.eval_append
- NLAlib.Ops.Operand.evalList_pushIdx
- NLAlib.Ops.Operand.eval_pushIdx
- NLAlib.Ops.writes_fill
- NLAlib.Ops.writes_fillRel
- NLAlib.Ops.writes_fillRel₂
- NLAlib.Ops.writes_fill_scratch
- NLAlib.Ops.writes_fill₂
- NLAlib.Ops.writes_ifPos
- NLAlib.Ops.writes_ifZero
- NLAlib.Ops.writes_loop
- NLAlib.Ops.writes_loop_frame_iterate
- NLAlib.Ops.writes_loop₂
- NLAlib.Ops.writes_whileFuel
- NLAlib.Ops.writes_whileStrict