Skip to content

cobol_coverage: LineMap equal-size blocks and absorbing GO TO (#4620, #4621) - #4667

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4620-4621-coverage-linemap
Oct 8, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4620-4621-coverage-linemap

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4620, Fixes #4621

Part of #4270 (found in #4602). Only the coverage tooling changes: tests/tools/cobol_coverage.py, its tests, and the regenerated tests/equivalence/det_sweep_coverage.json. No harness or runtime edits.

#4620 LineMap

_pairs no longer pairs an equal-size replace block index by index. Every block, equal or not, now pairs lines by similarity (>= SIMILAR). One addition: a rewritten line also pairs when it and the original are both the same IF/EVALUATE. Reason: the pure-similarity trial from the issue made the IF after a rewritten EXEC untraceable and dropped its outcomes from the totals (e.g. cbsa-abndproc 2/2 -> 0/0, acctupdate 310/397 -> 302/389). IF X NOT= DFHRESP(NORMAL) -> NOT= 0 can score below 0.75.

#4621 absorbing GO TO

In the absorbing pass, a GO TO whose every target is already absorbing now ends the path (not for DEPENDING ON, not when any target can fall through). Tests include a GO TO into a paragraph that falls through, a mixed target list, DEPENDING ON, and a chain.

Effect in this tree: none on any case's numbers. The issue expected CORPT00C PROCESS-ENTER-KEY 434 false, 445 false and SUBMIT-JOB-TO-INTRDR 476 false to become control-flow facts. They do not: those IFs follow an EVALUATE / IF whose other arms do not all transfer, so they stay data-flow (G) facts. Their entries in infeasible_outcomes.json are unchanged, and I added none.

Before -> after (full proof_sweep.py --det-only of all 53 cases, then det_coverage_ledger.py update)

Only two cases moved, both upward in raw branch coverage:

case (program) branches before after
carddemo-menu (COMEN01C) 28/33 29/33 (WHEN 147 now seen; IF 152 stays traceable)
genapp-lgicvs01 6/12 7/12

Paragraph coverage unchanged everywhere. The other 51 cases are identical. evidence_report.py --refresh produced no diff and --check passes: no program changed level.

Reachable-vs-infeasible candidates: none added. The remaining 4 uncovered menu branches are not reviewed here.

Checks

🤖 Generated with Claude Code

…O TO into an absorbing paragraph transfers control (#4620, #4621)

LineMap._pairs paired equal-size replace blocks index by index as exact, hiding COMEN01C WHEN 147; it now pairs by similarity (or the same IF/EVALUATE). control_flow_unreachable's absorbing pass counts a GO TO whose every target is absorbing as ending the path. Coverage ledger regenerated from a full det sweep.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 8, 2026 14:39
@squid-protocol
squid-protocol merged commit 61ed733 into main Oct 8, 2026
27 checks passed
@squid-protocol
squid-protocol deleted the fix/4620-4621-coverage-linemap branch October 8, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant