MONITOR blocks of ordinary statements recover #705

Manually merged
binjovi-bot merged 2 commits from l2b-control-flow into trunk 2026-11-03 16:19:05 +00:00
Owner

MONITOR blocks of ordinary statements recover

A MONITOR whose body and handler are ordinary statements is proven by its
measured registration (monitor.block, rpg_monitor.zig), not by the one
integer conversion of monitor.recover. The proof needs the 142 operation
entry, a body that ends in the counter decrement, the jump to the end and the
handler label, the reset statement of ON-ERROR, a handler, the reset statement
of ENDMON, closed labels, and the measured descriptor, context and counter
links. monitorProofs (rpg_shape.zig) builds the proofs of a procedure;
shapeOf cuts the counter decrement and the jump from the body, so the body
reads as source; controlStatus no longer reports monitor_boundaries on the
three edges of a proven block (monitorEdge).

Not covered: nested blocks, several ON-ERROR clauses, a RETURN in the body
(MONITOR/limits keep monitor_boundaries, block_owner, closing_destination).
rpg_eval.zig step is unchanged. rpg_statements.zig net growth is -4 lines.

Measured on the public twins (host build, Debug) against v0.1.415: 31 groups
turn recovered (decimal-fault-report, decimal-sign-report, packed-add-report,
packed-compose-report, packed-compose-sign-report, shared-io-full,
shared-io-none, DSPLY/error), 0 regressions; emit-diff: worse [], 8 better.
The statements of those programs that still fail (variable %SUBST index range
checks, WRITE effects) are other causes.

Gates

{"checks":{"net_statements":-4},"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":8,"newly_clean":0,"clean_delta":0,"base":317,"new":317},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/DSPLY/error-observable/archive.savf 4","savf/SC-ILE/DSPLY/error-stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 3"],"worse":[]},"full_check":{"exit":0,"seconds":808}}
# MONITOR blocks of ordinary statements recover A MONITOR whose body and handler are ordinary statements is proven by its measured registration (`monitor.block`, rpg_monitor.zig), not by the one integer conversion of `monitor.recover`. The proof needs the 142 operation entry, a body that ends in the counter decrement, the jump to the end and the handler label, the reset statement of ON-ERROR, a handler, the reset statement of ENDMON, closed labels, and the measured descriptor, context and counter links. `monitorProofs` (rpg_shape.zig) builds the proofs of a procedure; `shapeOf` cuts the counter decrement and the jump from the body, so the body reads as source; `controlStatus` no longer reports `monitor_boundaries` on the three edges of a proven block (`monitorEdge`). Not covered: nested blocks, several ON-ERROR clauses, a RETURN in the body (MONITOR/limits keep `monitor_boundaries`, `block_owner`, `closing_destination`). rpg_eval.zig `step` is unchanged. rpg_statements.zig net growth is -4 lines. Measured on the public twins (host build, Debug) against v0.1.415: 31 groups turn recovered (decimal-fault-report, decimal-sign-report, packed-add-report, packed-compose-report, packed-compose-sign-report, shared-io-full, shared-io-none, DSPLY/error), 0 regressions; emit-diff: worse [], 8 better. The statements of those programs that still fail (variable %SUBST index range checks, WRITE effects) are other causes. ## Gates ``` {"checks":{"net_statements":-4},"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":8,"newly_clean":0,"clean_delta":0,"base":317,"new":317},"twins":{"groups":462,"recovered":454,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":["savf/SC-ILE/DSPLY/error-observable/archive.savf 4","savf/SC-ILE/DSPLY/error-stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-fault-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/decimal-sign-report/stripped/archive.savf 4","savf/SC-ILE/EXPERIMENTS/packed-add-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/packed-compose-sign-report/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-full/stripped/archive.savf 3","savf/SC-ILE/EXPERIMENTS/shared-io-none/stripped/archive.savf 3"],"worse":[]},"full_check":{"exit":0,"seconds":808}} ```
binjovi-bot manually merged commit cc205a46cd into trunk 2026-11-03 16:19:05 +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!705
No description provided.