Skip to content

proof_blockers: the strict branch bar counts statically dead outcomes -- 13 CardDemo programs cannot reach it (#4270) #4602

Closed

Description

@squid-protocol

Part of #4270 (found while working the coverage: branch outcomes no scenario runs gap; #3804 / #4175 context).

The finding

proof_blockers.py --branches gives a program the strict bar only when every counted branch outcome runs (bc == bt, coverage_gaps). cobol_coverage.py sets dead units apart, but counts every branch outcome in a live unit. All 13 burned CardDemo programs whose only gap is branch coverage hold at least one outcome no input can reach, so no scenario, generated or written by hand, can get them to the bar. Writing scenarios for the reachable outcomes moves no program.

Measured on main 3167e2b. I ran a local det sweep scoped to the 14 cases (proof_sweep.py --det-only --skip-db2 --cases ...), and every case was proven. The uncovered outcomes match each case's evidence record:

program (case) branches statically dead outcomes (why) reachable but not run
COTRN01C (tranview) 23/24 RETURN-TO-PREV-SCREEN 199 true (G) none
COUSR01C (useradd) 20/21 167 true (G) none
COUSR02C (userupd) 44/46 252 true (G) REWRITE NOTFND (377), via a fault
COUSR03C (userdel) 30/32 199 true (G) DELETE NOTFND (323), via a fault
COADM01C (adminmenu) 20/26 all 6: 141 false (no DUMMY program in COADM02Y), WHEN 7..10 / OTHER at 241 (CDEMO-ADMIN-OPT-COUNT VALUE 6, never written) (C) none
COMEN01C (menu) 28/33 136 true (no option has type 'A'), WHEN DUMMY at 169, WHEN 12 / OTHER at 274 (count VALUE 11) (C) WHEN COPAUS0C at 147 (option 11)
COCRDLIC (cardlist) 144/151 586 true AND false: every arm of the EVALUATE before it ends in GO TO or XCTL (F) 757 / 897 / 913 / 1177 / 1218 (not classified)
COCRDSLC (cardview) 67/77 386 true AND false: every arm ends in GO TO, XCTL or SEND-PLAIN-TEXT's RETURN (F) the other 8 (not classified)
COBIL00C (billpay) 38/48 275 true (G) 9: PF3 with a FROM-PROGRAM, REWRITE NOTFND, READ CXACAIX / STARTBR / READPREV NOTFND, ENDFILE and OTHER, WRITE DUPKEY
CORPT00C (report) 40/59 542 true (G) most of them; 225 true needs a December clock (the case clock is set per case)
COTRN00C (tranlist) 85/101 512 true (G), 390 OTHER and 452 OTHER (WS-IDX stays within 1..10) (C) row selections 2-10, PF7 with a blank first key, the PAGE-BACKWARD error paths
COUSR00C (userlist) 84/100 508 true (G), 386 OTHER and 448 OTHER (same loop bounds) (C) the same pattern as tranlist
COTRN02C (tranadd) 56/75 502 true (G) 18 (not classified)

The three kinds of dead outcome:

  • G: the guard IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN. Every caller first moves a non-blank literal into CDEMO-TO-PROGRAM, or CDEMO-FROM-PROGRAM after testing that it is not SPACES or LOW-VALUES.
  • C: a WHEN or IF that tests a constant table or count (a copybook VALUE that is never written) or a loop index whose bounds are fixed.
  • F: an IF that follows an EVALUATE whose every arm transfers control and does not return (GO TO, XCTL, RETURN). This is a control-flow fact. The unit-level reachability already knows it, but the branch counting does not use it.

Proposal (owner decision)

  1. F (sound and cheap): cobol_coverage leaves out of total the branch points that no path reaches after an arm that always transfers control. These are counted apart, like in_dead_code.
  2. G and C: a reviewed per-case declaration of infeasible outcomes. Each entry gives unit:line:outcome and the reason, the same shape as the unreachable verdict in mutation_scores.json. proof_blockers subtracts the declared outcomes and prints them. Each outcome is listed, never faked: a run that reaches a declared outcome fails the declaration.

Until one of these lands, the strict bar for these 13 programs cannot be met honestly, and new scenarios move 0 of them.

A second, smaller finding

Before this sweep, coverage: unknown (no sweep, no evidence record) covered 9 programs. A det sweep of their cases (--skip-db2) shows that ABNDPROC (cbsa-abndproc, 4/4 paragraphs, 2/2 branches) and UPDCUST (cbsa-updcust, 7/7, 28/28) already meet the strict bar: proven is 1 -> 3 with --sweep. These cases have no committed port, so they have no evidence record. Without --sweep, proof_blockers cannot see them, because CI's det-sweep ratchet stores verdicts but not coverage. A follow-up could have the det-sweep keep coverage (for example det_sweep_baseline / an artifact) so that main's measurement counts them. The other 7 are lgacvs01, lgdpvs01, lgucvs01 and epsmlist (with a non-Db2 case now measured, the best case for each is a Db2 case: not proven in CI: Db2), plus COACTUPC 310/397, COACTVWC 58/71 and lgupvs01 5/9, which have real branch gaps.

Activity

  1. squid-protocol commented on Oct 7, 2026

    @squid-protocol
    OwnerAuthor

    Owner decision (2026-10-07): do BOTH. (1) cobol_coverage stops counting branch outcomes after an arm that always transfers control (GO TO / XCTL / RETURN / GOBACK / STOP RUN): a sound control-flow fact. (2) A reviewed per-case list of infeasible outcomes, each with a reason and the COBOL line; proof_blockers subtracts them; a run that reaches a listed outcome fails. Entries are proposed by agents and reviewed by the owner in the PR; the evidence report shows them as stated assumptions, never hidden.

  2. squid-protocol commented on Oct 7, 2026

    @squid-protocol
    OwnerAuthor

    The six CBSA/GenApp Db2 programs whose only gap is branches (from the EIBTASKN slice, #4270)

    With EIBTASKN stated (branch det/4270-eibtaskn-stated, rebased on main and pushed, no PR), the only gap left for DELACC, LGACDB01, LGACDB02, LGDPDB01, LGIPDB01 and LGUCDB01 is coverage: branch outcomes. I classified every unrun outcome against the local det sweep that includes Db2. None of the six can reach the strict bar. DELACC is blocked by an outcome no input can reach. Each GenApp program is blocked by three outcomes behind X6. So the slice stopped and no PR was opened.

    Kinds:

    • I: infeasible.
    • X6: feasible on z/OS but not judgeable. GenApp's WRITE-ERROR-MESSAGE runs IF EIBCALEN > 0 → IF EIBCALEN < 91 → LINK LGSTSQ with the 99-byte CA-ERROR-MSG, and LGSTSQ then writes 104 bytes from its 95-byte WRITE-MSG.
    • D: needs a declared SQL fault whose path LINKs LGSTSQ. A non-derived scenario that reaches an unrun LINK refuses the whole case. With LGSTSQ run, the second LINK is X6.
    • E0: EIBCALEN 0. Needs LGSTSQ in programs, a region, and equivalence harness: COBOL side drops WRITEQ TS events (first hit: GenApp LGSTSQ run in-task) #4607 (the COBOL side drops WRITEQ TS events).
    • L: needs a COMMAREA shorter than 32500. The harness has no per-scenario length.
    • S: reachable with a case-added seed row.
    program branches I X6 other
    DELACC 13/14 363 false: IF SQLCODE = 0 in RAD010. Line 282 ABENDs HRAC on anything but 0/+100, and line 350 does GO TO RAD999 on +100, so SQLCODE is 0 here – –
    LGACDB02 5/10 – 210 T, 211 T/F E0: 131 T, 210 F
    LGACDB01 8/14 (+ line 206 unresolvable: "the compiled text changed its line") – 313 T, 314 T/F (314 T only at EIBCALEN = 90 exactly) E0: 149 T, 313 F; L: 165 T (EIBCALEN < 90)
    LGDPDB01 6/12 – 230 T, 231 T/F E0: 131 T, 230 F; L: 143 T (EIBCALEN < 28)
    LGUCDB01 4/10 – 207 T, 208 T/F E0: 117 T, 207 F; S: 173 T (UPDATE +100 for a customer missing from Db2 CUSTOMER that KSDSCUST still has, so LGUCVS01's READ UPDATE / REWRITE stays NORMAL)
    LGIPDB01 48/74 – 1015 T, 1016 T/F E0: 251 T, 1015 F. L: 390 T, 487 T, 581 T, 689 T, 793 T ('98'). S: 383 T + 410 T (an ENDOWMENT row with PADDINGDATA), 397 F, 400 F, 494 F, 497 F, 588 F, 591 F (POLICY rows with NULL BROKERID / PAYMENT; both nullable in db2cre.jcl), 907 T (21+ COMMERCIAL rows for one customer). D: 421 F, 512 F, 610 F, 712 F, 817 F (a negative SQLCODE on SELECT INTO; the auto fault is +100), 855 T, 938 T (a CLOSE failing; CLOSE gets no auto fault)

    Probe (not committed): genapp-lgacdb02 with LGSTSQ in programs and a commarea: null scenario. The run differs only by the WRITEQ-TS event (#4607). It also shows a trade-off: running LGSTSQ in-task turns the auto fault task add-password--sql-lgacdb02-166, which was judged up to the LINK (#4173), into an X6 refusal (WRITEQ TD LENGTH > FROM). That task leaves the coverage, so the result is 6/10, not 7/10.

    What would move these programs:

    1. DELACC needs this issue's proposal: a declared RAD010:363:false (a data-flow guard, the same family as G).
    2. Every GenApp program needs X6 settled on z/OS, or a decision that a derived task refused at X6 is judged up to the refused WRITEQ, as equivalence: SQL fault injection (register M2) so SQLCODE error branches are proven #4173 does for an unrun LINK. Even then, EIBCALEN < 91 true needs a short-COMMAREA scenario (L).
    3. equivalence harness: COBOL side drops WRITEQ TS events (first hit: GenApp LGSTSQ run in-task) #4607 (E0), a per-scenario COMMAREA length (L), and seed rows (S) are cheap, but none of them moves a program at the strict bar on its own.

    🤖 Generated with Claude Code

  3. added 20 commits that reference this issue on Oct 7, 2026
  4. added
    scope:core
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions