rpg_trace: the whole-body recognizers of rpg_trim and rpg_range print scan instead of refusal #814

Manually merged
binjovi-bot merged 2 commits from lane-sc2-recognizers-20261117 into trunk 2026-11-17 16:26:30 +00:00
Owner

rpg_trace: the whole-body recognizers of rpg_trim and rpg_range print scan instead of refusal

Lane Sc marked the scans that try a pattern at every index. A second kind is left: the
recognizers that rpg_trim.rewrite tries on every body (assignment, then trim_varying.rewrite
and varying_concat.rewrite, then range.unit at every index) and the helpers they call. Each
declines at its first guard for most bodies and falls through to the next reader on null, so none of
them ends a statement. Their Debug tokens now read scan <file>.<function> <site> (scanAt,
scanRet from lane Sc). Debug trace only: the release binary and every emit byte are unchanged.

Marked sites, all sites of each function:

  • rpg_trim.assignment (with its local of checks) and rpg_trim.pointerAddress (called only by it)
  • rpg_trim.loops, loopsFrom, leading, trailing, lengthAt, blankTest, step, jump:
    called only from assignment, trim_varying.rewrite, halves (itself called by the scans
    assignUnit, unit, argumentUnit) and charAssign; no statement-ending caller, so no split
    was needed
  • rpg_range.unit (the reader of rpg_range.unit, tried by rewrite at every index)

rpg_trim_varying.rewrite and rpg_varying_concat.rewrite print no token at all (a bare null), so
there is nothing to mark.

Kept as refusal (a statement-ending caller exists: rpg_char_chain, rpg_display, the tails):
copyTail, aimBefore, stripShape, charStrip, opsAre, target, label, store, integer,
owned, blank.

Test: src/rpg_scan_marker_test.zig lists the new scan functions (every site scan, no refusal
form) and checks that the shared leaf helpers keep refusal.

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","legend":"current","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":738,"new":738},"twins":{"groups":1022,"recovered":1015,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"unit":{"exit":0,"last":"ship-unit: src/rpg_scan_marker_test.zig ok"},"full_check":{"exit":0,"seconds":1686}}
# rpg_trace: the whole-body recognizers of rpg_trim and rpg_range print scan instead of refusal Lane Sc marked the scans that try a pattern at every index. A second kind is left: the recognizers that `rpg_trim.rewrite` tries on every body (`assignment`, then `trim_varying.rewrite` and `varying_concat.rewrite`, then `range.unit` at every index) and the helpers they call. Each declines at its first guard for most bodies and falls through to the next reader on null, so none of them ends a statement. Their Debug tokens now read `scan <file>.<function> <site>` (`scanAt`, `scanRet` from lane Sc). Debug trace only: the release binary and every emit byte are unchanged. Marked sites, all sites of each function: - `rpg_trim.assignment` (with its local `of` checks) and `rpg_trim.pointerAddress` (called only by it) - `rpg_trim.loops`, `loopsFrom`, `leading`, `trailing`, `lengthAt`, `blankTest`, `step`, `jump`: called only from `assignment`, `trim_varying.rewrite`, `halves` (itself called by the scans `assignUnit`, `unit`, `argumentUnit`) and `charAssign`; no statement-ending caller, so no split was needed - `rpg_range.unit` (the reader of `rpg_range.unit`, tried by `rewrite` at every index) `rpg_trim_varying.rewrite` and `rpg_varying_concat.rewrite` print no token at all (a bare null), so there is nothing to mark. Kept as `refusal` (a statement-ending caller exists: `rpg_char_chain`, `rpg_display`, the tails): `copyTail`, `aimBefore`, `stripShape`, `charStrip`, `opsAre`, `target`, `label`, `store`, `integer`, `owned`, `blank`. Test: `src/rpg_scan_marker_test.zig` lists the new scan functions (every site scan, no refusal form) and checks that the shared leaf helpers keep `refusal`. ## 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","legend":"current","emit":{"worse":[],"better":0,"newly_clean":0,"clean_delta":0,"base":738,"new":738},"twins":{"groups":1022,"recovered":1015,"regressions":[],"newly":0},"allgroups":{"regressions":[],"newly":[],"worse":[]},"unit":{"exit":0,"last":"ship-unit: src/rpg_scan_marker_test.zig ok"},"full_check":{"exit":0,"seconds":1686}} ```
binjovi-bot manually merged commit 7186d0028b into trunk 2026-11-17 16:26:30 +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!814
No description provided.