Counted loops with state invariants
Library · Source module
Counted loops with state invariants
A stored size query can select one operation shape rather than every syntactically possible shape. The loop invariant justifies the selected per-iteration count. Accumulation then uses the sum of those counts and the maximum per-iteration workspace, without a supremum over unreachable stored sizes.
Main results
* NLAlib.Ops.iter_within_of_invariant: accumulate actual shape-specific iteration budgets. * NLAlib.Ops.iter_weight_le_of_invariant: accumulate weighted actual counts directly.