Operation 138 is the index limit check of an array element #711

Manually merged
binjovi-bot merged 3 commits from sourcerer-l3b into trunk 2026-11-04 10:55:13 +00:00
Owner

Operation 138 is the index limit check of an array element

Operation 138 (no operands) was listed as unknown. In the array element
sequence 27 T; 77 8; 76 4; 27 ONE; 52; 27 K; 138; 78 4; 65 W; 32 A 0 TE
the constant K is the dimension minus one on all three public twins
(decimal-fault-report statement 45, K 8 for dim(9); decimal-sign-report 55,
K 18 for dim(19); OPS cond-not 26, K 4 for dim(5)). The compiler sets the
one-based index to the dimension plus one when it is out of range, so the
zero-based index is then K + 1. Operation 138 takes K and the index below it,
signals the array index error when the index is above K, and leaves the index
for 78 4 and 65 W. Not measured on a host (it is down): the exception
itself is read from the sequence, not from a run. rpg_eval_ops.zig has the
step arm (drop K, keep the index; a stack of fewer than two values refuses),
rpg_op138_test.zig states the K evidence, tools/ops-legend.sh reads the
arms of rpg_eval_ops.zig too, and docs/OPERATIONS.md lists 138 as class a.

Gates

{"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":322,"new":322},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":726}}
## Operation 138 is the index limit check of an array element Operation 138 (no operands) was listed as unknown. In the array element sequence `27 T; 77 8; 76 4; 27 ONE; 52; 27 K; 138; 78 4; 65 W; 32 A 0 TE` the constant K is the dimension minus one on all three public twins (decimal-fault-report statement 45, K 8 for `dim(9)`; decimal-sign-report 55, K 18 for `dim(19)`; OPS cond-not 26, K 4 for `dim(5)`). The compiler sets the one-based index to the dimension plus one when it is out of range, so the zero-based index is then K + 1. Operation 138 takes K and the index below it, signals the array index error when the index is above K, and leaves the index for `78 4` and `65 W`. Not measured on a host (it is down): the exception itself is read from the sequence, not from a run. `rpg_eval_ops.zig` has the step arm (drop K, keep the index; a stack of fewer than two values refuses), `rpg_op138_test.zig` states the K evidence, `tools/ops-legend.sh` reads the arms of `rpg_eval_ops.zig` too, and docs/OPERATIONS.md lists 138 as class a. ## Gates ``` {"checks":{"net_statements":0},"census":{"statuses":{"recovered":645,"partial":0,"unresolved":0},"regressions":0,"newly_recovered":0},"golden":"golden floor 173 ceiling 0 <= dump 173/5/0","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":322,"new":322},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"full_check":{"exit":0,"seconds":726}} ```
sean force-pushed sourcerer-l3b from 5795bbac91
All checks were successful
binjovi/ci Binjovi completed the frozen plan
to 27405c9109
All checks were successful
binjovi/ci Binjovi completed the frozen plan
2026-11-04 10:05:28 +00:00
Compare
binjovi-bot manually merged commit 27405c9109 into trunk 2026-11-04 10:55:13 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
sean/sourcerer!711
No description provided.