Repository navigation
cobol_coverage: LineMap equal-size blocks and absorbing GO TO (#4620, #4621) - #4667
Merged
Merged
Conversation
…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]>
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4620, Fixes #4621
Part of #4270 (found in #4602). Only the coverage tooling changes:
tests/tools/cobol_coverage.py, its tests, and the regeneratedtests/equivalence/det_sweep_coverage.json. No harness or runtime edits.#4620 LineMap
_pairsno longer pairs an equal-sizereplaceblock 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= 0can score below 0.75.#4621 absorbing GO TO
In the absorbing pass, a
GO TOwhose every target is already absorbing now ends the path (not forDEPENDING 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-KEY434 false, 445 false andSUBMIT-JOB-TO-INTRDR476 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 ininfeasible_outcomes.jsonare unchanged, and I added none.Before -> after (full
proof_sweep.py --det-onlyof all 53 cases, thendet_coverage_ledger.py update)Only two cases moved, both upward in raw branch coverage:
Paragraph coverage unchanged everywhere. The other 51 cases are identical.
evidence_report.py --refreshproduced no diff and--checkpasses: no program changed level.Reachable-vs-infeasible candidates: none added. The remaining 4 uncovered menu branches are not reviewed here.
Checks
test_cobol_coverage.py: the cobol_coverage: LineMap pairs equal-size rewritten blocks as exact, hiding COMEN01C WHEN 147 #4620 and cobol_coverage: a GO TO into a paragraph that only RETURNs is a transfer of control #4621 tests fail on origin/main code and pass now (a third test guards the IF-rewrite pairing); alsotest_det_coverage_ledger.py,test_evidence_report.pypass.pr_gates.py --fast: 5/5 pass.pr_gates.py --ratchets: 7 pass, 0 fail, 0 skipped.det_coverage_ledger.py checkclean after update.🤖 Generated with Claude Code