diff options
| author | eunhhu <[email protected]> | 2026-09-26 11:15:42 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-09-26 11:15:42 +0100 |
| commit | cd3fcb9873e23c2d07bd4e9d02d2111c96959440 (patch) | |
| tree | f268a01a5fd712b03b4b072dd94d173c9644bcd2 /prototypes/live-rules/runtime.mjs | |
| parent | d340b1a43255d83be5d9fc64de434a24bd87c8be (diff) | |
| download | pure-cd3fcb9873e23c2d07bd4e9d02d2111c96959440.tar.gz pure-cd3fcb9873e23c2d07bd4e9d02d2111c96959440.zip | |
Add folds: counts, sums, maxima and minima over a list
FOLD (opcode 65) runs the block that follows it once per item of a list,
as a column of that list, and pushes the count of items whose block left
a non-zero number, or the sum, maximum or minimum of the values the block
left with an include flag; an empty maximum or minimum is not_found. The
verifier checks the block as a column (reads only, one or two numbers
left, no fold inside, so the work is bounded by block length times items)
and treats it from outside as one instruction that nothing branches into.
Views and handlers can now say how many tasks are open or what the scores
add up to without keeping a second copy of it in state.
The checks cover values, empty lists, filters, a fold inside arithmetic,
six refusals and 20,000 damaged fold modules run under ASan and UBSan.
Diffstat (limited to 'prototypes/live-rules/runtime.mjs')
0 files changed, 0 insertions, 0 deletions
