Skip to content

equivalence: infeasible branch outcomes and control-flow-aware coverage (#4602) - #4624

Merged
squid-protocol merged 6 commits into
mainfrom
equiv/4602-infeasible-outcomes
Oct 7, 2026
Merged

squid-protocol merged 6 commits into
mainfrom
equiv/4602-infeasible-outcomes

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4270. Fixes #4602.

Both halves of the owner decision on #4602, applied to the 13 CardDemo programs whose only gap was branch coverage.

Strict bar (every counted branch outcome run): 3 -> 13 programs proven.

What changed

  1. cobol_coverage: no branch outcomes are counted after a transfer of control.
    • A branch point is set apart (branches.after_transfer, beside in_dead_code) when every path to it passes a statement that never falls through:
      • GO TO (but not GO TO ... DEPENDING ON)
      • GOBACK, STOP RUN
      • EXEC CICS RETURN / XCTL / ABEND with no RESP or NOHANDLE
      • a plain PERFORM of a paragraph that no path leaves. Every HANDLE CONDITION / AID / ABEND label and every SQL WHENEVER GO TO label must be such a paragraph too, otherwise no paragraph counts as one.
    • Conservative choices: a conditional phrase (AT END, INVALID KEY, ON SIZE ERROR, ...), an inline PERFORM, an IF with no ELSE and an EVALUATE with no WHEN OTHER may all fall through. A COPY or an Area A line ends the unreachable region.
    • A run that takes a set-apart outcome is flagged (after_transfer_but_taken), never counted.
    • The tests were written first and failed before the change.
    • Across every corpus beside the main checkout, it sets apart only COCRDLIC 586, COCRDSLC 386 and COACTVWC 387. Nothing changes in the cics-crucible or census programs.
  2. A reviewed ledger of infeasible outcomes: tests/equivalence/infeasible_outcomes.json.
    • One ledger beside det_sweep_coverage.json, shaped like the unreachable verdict in mutation_scores.json. It is not a file per case, because a file inside a case directory would make its evidence record stale.
    • Each entry gives the paragraph, the line, the outcome, a family and a reason citing the COBOL.
    • proof_blockers.py takes the stated outcomes out of a case's branch total when the proof left them uncovered, and prints them. A stated outcome the proof reached is a gap of its own (infeasible outcome reached).
    • Every det sweep keeps each case's uncovered list, and the sweep fails when a proof reaches a stated outcome.
    • infeasible_outcomes.stated(case) is the function the evidence report (tooling: purchaser-facing evidence report (#4601) #4603) can call to show the entries as stated assumptions. infeasible_outcomes.py show prints the table below.
    • The repo's *.json ignore rule had kept the ledger out of git, so .gitignore gets an exception and a test checks the file is tracked.
  3. CardDemo.
    • 57 scenarios for the outcomes that inputs can reach: billpay 8, tranadd 15, report 9, tranlist 11, userlist 11, cardlist 2, cardview 1.
    • 45 proposed entries for the outcomes no input can reach.
    • The evidence records of the changed cases were re-proven with evidence.py prove: the model ports prove the new scenarios. The pages were re-rendered, and det_sweep_coverage.json was refreshed with its tool. No expected output was edited.

Per case (raw covered/total, before -> after)

case (program) before after, raw stated after, stated taken out strict bar
carddemo-adminmenu (COADM01C) 20/26 20/26 6 20/20 (100%) yes
carddemo-billpay (COBIL00C) 38/48 46/48 2 46/46 (100%) yes
carddemo-cardlist (COCRDLIC) 144/151 146/149 2 146/147 (99%) no
carddemo-cardview (COCRDSLC) 67/77 69/75 6 69/69 (100%) yes
carddemo-menu (COMEN01C) 28/33 28/33 3 28/30 (93%) no
carddemo-report (CORPT00C) 40/59 51/59 7 51/52 (98%) no
carddemo-tranadd (COTRN02C) 56/75 72/75 3 72/72 (100%) yes
carddemo-tranlist (COTRN00C) 85/101 96/101 5 96/96 (100%) yes
carddemo-tranview (COTRN01C) 23/24 23/24 1 23/23 (100%) yes
carddemo-useradd (COUSR01C) 20/21 20/21 1 20/20 (100%) yes
carddemo-userdel (COUSR03C) 30/32 30/32 2 30/30 (100%) yes
carddemo-userlist (COUSR00C) 84/100 95/100 5 95/95 (100%) yes
carddemo-userupd (COUSR02C) 44/46 44/46 2 44/44 (100%) yes

Not at the bar:

  • COCRDLIC: 1218 false is reachable, but only with a different card file for one scenario.
  • CORPT00C: 225 true needs a December clock, and the harness has no per-scenario clock.
  • COMEN01C: 136 true reads past the 11-entry option table after an invalid option, so it can be neither shown infeasible nor reached reliably. WHEN 147 does run, but a line-mapping defect hides it.
  • Follow-up issues are listed below.

COACTVWC (acctview) now reads 58/69, because line 387 is set apart. Its scenarios are unchanged.

Entries for review (45)

Families:

  • G: a guard every caller has already satisfied.
  • C: a test of a constant.
  • R: a response the command never raises (IBM's documented conditions).
case paragraph:line outcome family why no input reaches it
carddemo-adminmenu PROCESS-ENTER-KEY:141 IF false C IF CDEMO-ADMIN-OPT-PGMNAME(WS-OPTION)(1:5) NOT = 'DUMMY' runs only under IF NOT ERR-FLG-ON (140), i.e. after the test at 131-133 let WS-OPTION through as numeric, not zero and not > CDEMO-ADMIN-OPT-COUNT (6, COADM02Y line 22); the program names of options 1-6 are the copybook VALUEs 'COUSR00C', 'COUSR01C', 'COUSR02C', 'COUSR03C', 'COTRTLIC', 'COTRTUPC' (COADM02Y lines 29-53) and COADM01C never writes the table, so none starts with 'DUMMY'.
carddemo-adminmenu BUILD-MENU-OPTIONS:241 EVALUATE OTHER C EVALUATE WS-IDX WHEN OTHER inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-ADMIN-OPT-COUNT (231-232): the count is the constant 6 (COADM02Y line 22 05 CDEMO-ADMIN-OPT-COUNT PIC 9(02) VALUE 6), never written by COADM01C, and the loop body does not change WS-IDX, so WS-IDX is always 1-6, each matched by WHEN 1-6.
carddemo-adminmenu BUILD-MENU-OPTIONS:241 EVALUATE WHEN@254 C EVALUATE WS-IDX WHEN 7 inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-ADMIN-OPT-COUNT (231-232): the count is the constant 6 (COADM02Y line 22 05 CDEMO-ADMIN-OPT-COUNT PIC 9(02) VALUE 6), never written by COADM01C, and the loop body does not change WS-IDX, so WS-IDX takes only 1-6.
carddemo-adminmenu BUILD-MENU-OPTIONS:241 EVALUATE WHEN@256 C EVALUATE WS-IDX WHEN 8 inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-ADMIN-OPT-COUNT (231-232): the count is the constant 6 (COADM02Y line 22 05 CDEMO-ADMIN-OPT-COUNT PIC 9(02) VALUE 6), never written by COADM01C, and the loop body does not change WS-IDX, so WS-IDX takes only 1-6.
carddemo-adminmenu BUILD-MENU-OPTIONS:241 EVALUATE WHEN@258 C EVALUATE WS-IDX WHEN 9 inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-ADMIN-OPT-COUNT (231-232): the count is the constant 6 (COADM02Y line 22 05 CDEMO-ADMIN-OPT-COUNT PIC 9(02) VALUE 6), never written by COADM01C, and the loop body does not change WS-IDX, so WS-IDX takes only 1-6.
carddemo-adminmenu BUILD-MENU-OPTIONS:241 EVALUATE WHEN@260 C EVALUATE WS-IDX WHEN 10 inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-ADMIN-OPT-COUNT (231-232): the count is the constant 6 (COADM02Y line 22 05 CDEMO-ADMIN-OPT-COUNT PIC 9(02) VALUE 6), never written by COADM01C, and the loop body does not change WS-IDX, so WS-IDX takes only 1-6.
carddemo-billpay RETURN-TO-PREV-SCREEN:275 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 108 moves 'COSGN00C', line 130 'COMEN01C', and line 133 moves CDEMO-FROM-PROGRAM only after line 129 tested it is neither SPACES nor LOW-VALUES; both fields PIC X(08), COCOM01Y). COBIL00C never moves SPACES or LOW-VALUES into it in between.
carddemo-billpay UPDATE-ACCTDAT-FILE:387 EVALUATE WHEN@390 R WHEN DFHRESP(NOTFND) after EXEC CICS REWRITE DATASET(WS-ACCTDAT-FILE) (line 379): REWRITE updates the record the READ ... UPDATE at line 345 holds; IBM's REWRITE conditions do not include NOTFND (https://www.ibm.com/docs/en/cics-ts/6.x?topic=summary-rewrite; our spec, gitgalaxy/standards/cics/commands/files.py, lists NORMAL and INVREQ).
carddemo-cardlist 1250-SETUP-ARRAY-ATTRIBS:757 IF true G IF WS-EDIT-SELECT(1) = SPACE OR LOW-VALUES is only reached when WS-ROW-CRDSELECT-ERROR(1) = '1' (line 755). That flag is INITIALIZEd to spaces with WS-MISC-STORAGE (line 300) and set to '1' only in 2250-EDIT-ARRAY: at line 1104 when SELECT-OK(1) ('S' or 'U'), at line 1110 in WHEN OTHER after SELECT-BLANK(1) (' ' or LOW-VALUES, lines 80-82) failed, and by the INSPECT at lines 1090-1093, which turns only 'S' / 'U' into '1'. WS-EDIT-SELECT(1) is written only at line 972 (2100-RECEIVE-SCREEN, performed before 2200-EDIT-INPUTS at lines 952-956), so it is never blank when its error flag is '1'.
carddemo-cardlist 1400-SETUP-MESSAGE:897 EVALUATE OTHER G 1400-SETUP-MESSAGE is only PERFORMed by 1000-SEND-MAP (line 633), right after 1100-SCREEN-INIT (line 625), which ends with SET WS-NO-INFO-MESSAGE TO TRUE (line 669); nothing in 1200 / 1250 / 1300 writes WS-INFO-MSG. So when no earlier WHEN matches, WHEN WS-NO-INFO-MESSAGE (line 917) always does, and WHEN OTHER (line 920) cannot be taken.
carddemo-cardview 1300-SETUP-SCREEN-ATTRS:553 IF true G 1300-SETUP-SCREEN-ATTRS is only PERFORMed by 1000-SEND-MAP (line 417), right after 1200-SETUP-SCREEN-VARS (line 415), which ends with IF WS-NO-INFO-MESSAGE SET WS-PROMPT-FOR-INPUT TO TRUE (lines 490-492): WS-INFO-MSG leaves 1200 non-blank, and nothing at lines 494-552 writes it, so IF WS-NO-INFO-MESSAGE at line 553 is never true.
carddemo-cardview 2210-EDIT-ACCOUNT:656 IF false G IF WS-RETURN-MSG-OFF: WS-RETURN-MSG is set to SPACES at line 264 and 2210-EDIT-ACCOUNT is the first edit (only PERFORMed at line 630, in 2200-EDIT-MAP-INPUTS after 2100-RECEIVE-MAP, neither of which writes it before), so the message is always still off here.
carddemo-cardview 2210-EDIT-ACCOUNT:668 IF false G IF WS-RETURN-MSG-OFF at line 668 is reached only when the blank test at line 651 failed (it GOes TO the exit at line 660), so no message was set in this paragraph either; as for line 656, WS-RETURN-MSG is still the SPACES set at line 264.
carddemo-cardview 9100-GETCARD-BYACCTCARD:759 IF false G 9100 runs only through 9000-READ-DATA, PERFORMed at line 344 (entry from the card list: nothing sets WS-RETURN-MSG after line 264) and at line 365 (the ELSE of IF INPUT-ERROR at line 360). Every message 2200-EDIT-MAP-INPUTS sets (lines 657, 671, 697, 711, 639) comes with SET INPUT-ERROR, so at line 365 the message is still off: IF WS-RETURN-MSG-OFF (NOTFND) is always true.
carddemo-cardview 9100-GETCARD-BYACCTCARD:764 IF false G Same as line 759: in WHEN OTHER of the READ at line 742, WS-RETURN-MSG is still the SPACES set at line 264 on both paths into 9100 (lines 344 and 365), so IF WS-RETURN-MSG-OFF is always true.
carddemo-cardview ABEND-ROUTINE:859 IF true C IF ABEND-MSG EQUAL LOW-VALUES: ABEND-MSG is PIC X(72) VALUE SPACES (CSMSG02Y, lines 28-29), outside the items INITIALIZEd at lines 254-256, and the program writes it only at line 860 (a non-blank literal). It is never LOW-VALUES.
carddemo-menu PROCESS-ENTER-KEY:146 EVALUATE WHEN@169 C WHEN CDEMO-MENU-OPT-PGMNAME(WS-OPTION)(1:5) = 'DUMMY' runs only under IF NOT ERR-FLG-ON (145), i.e. after the test at 127-129 let WS-OPTION through as numeric, not zero and not > CDEMO-MENU-OPT-COUNT (11, COMEN02Y line 21 05 CDEMO-MENU-OPT-COUNT PIC 9(02) VALUE 11); the program names of options 1-11 are the copybook VALUEs COACTVWC, COACTUPC, COCRDLIC, COCRDSLC, COCRDUPC, COTRN00C, COTRN01C, COTRN02C, CORPT00C, COBIL00C, COPAUS0C (COMEN02Y lines 28-89) and COMEN01C never writes the table, so none starts with 'DUMMY'.
carddemo-menu BUILD-MENU-OPTIONS:274 EVALUATE OTHER C EVALUATE WS-IDX WHEN OTHER inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-MENU-OPT-COUNT (264-265): the count is the constant 11 (COMEN02Y line 21 05 CDEMO-MENU-OPT-COUNT PIC 9(02) VALUE 11), never written by COMEN01C, and the loop body does not change WS-IDX, so WS-IDX is always 1-11, each matched by WHEN 1-11.
carddemo-menu BUILD-MENU-OPTIONS:274 EVALUATE WHEN@297 C EVALUATE WS-IDX WHEN 12 inside PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > CDEMO-MENU-OPT-COUNT (264-265): the count is the constant 11 (COMEN02Y line 21 05 CDEMO-MENU-OPT-COUNT PIC 9(02) VALUE 11), never written by COMEN01C, and the loop body does not change WS-IDX, so WS-IDX takes only 1-11.
carddemo-report PROCESS-ENTER-KEY:347 IF true G IF SDTYYYYI IS NOT NUMERIC: lines 313-315 have just moved WS-NUM-9999 (PIC 9999, line 75: unsigned display digits) into SDTYYYYI (PIC X(4), CORPT00.CPY), so it always holds four digits
carddemo-report PROCESS-ENTER-KEY:373 IF true G IF EDTYYYYI IS NOT NUMERIC: lines 325-327 have just moved WS-NUM-9999 (PIC 9999, line 75: unsigned display digits) into EDTYYYYI (PIC X(4), CORPT00.CPY), so it always holds four digits
carddemo-report PROCESS-ENTER-KEY:434 IF false G IF NOT ERR-FLG-ON can only be false after an error was flagged, but every MOVE 'Y' TO WS-ERR-FLG (lines 191, 263-298, 333-376, 402, 422, 440, 471, 482, 491, 530) is followed by PERFORM SEND-TRNRPT-SCREEN, which never returns: it ends in GO TO RETURN-TO-CICS (line 580), whose EXEC CICS RETURN (line 587, no RESP / NOHANDLE) ends the task; WS-ERR-FLG starts 'N' (SET ERR-FLG-OFF, line 165)
carddemo-report PROCESS-ENTER-KEY:445 IF false G IF NOT ERR-FLG-ON after the report EVALUATE: every MOVE 'Y' TO WS-ERR-FLG (lines 191, 263-298, 333-376, 402, 422, 440, 471, 482, 491, 530) is followed by PERFORM SEND-TRNRPT-SCREEN, which never returns: it ends in GO TO RETURN-TO-CICS (line 580), whose EXEC CICS RETURN (line 587, no RESP / NOHANDLE) ends the task; WS-ERR-FLG starts 'N' (SET ERR-FLG-OFF, line 165)
carddemo-report SUBMIT-JOB-TO-INTRDR:476 IF false G IF NOT ERR-FLG-ON: the only flag set before it in this task is line 471, followed by PERFORM SEND-TRNRPT-SCREEN, which never returns; every MOVE 'Y' TO WS-ERR-FLG (lines 191, 263-298, 333-376, 402, 422, 440, 471, 482, 491, 530) is followed by PERFORM SEND-TRNRPT-SCREEN, which never returns: it ends in GO TO RETURN-TO-CICS (line 580), whose EXEC CICS RETURN (line 587, no RESP / NOHANDLE) ends the task; WS-ERR-FLG starts 'N' (SET ERR-FLG-OFF, line 165)
carddemo-report RETURN-TO-PREV-SCREEN:542 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 173 moves 'COSGN00C' and line 188 'COMEN01C'; both fields PIC X(08), COCOM01Y). CORPT00C never moves SPACES or LOW-VALUES into it in between.
carddemo-report SEND-TRNRPT-SCREEN:562 IF false C IF SEND-ERASE-YES: WS-SEND-ERASE-FLG has VALUE 'Y' (line 47) and the only statement that writes it is SET SEND-ERASE-YES TO TRUE (line 167); SEND-ERASE-NO is never set
carddemo-tranadd VALIDATE-INPUT-DATA-FIELDS:237 IF true G IF ERR-FLG-ON at the head of VALIDATE-INPUT-DATA-FIELDS: MAIN-PARA sets ERR-FLG-OFF (line 109) and every MOVE 'Y' TO WS-ERR-FLG that can run before it (lines 149, 198, 212, 225 and the xref READs at 592 / 599 / 625 / 632) is followed by PERFORM SEND-TRNADD-SCREEN, which ends in EXEC CICS RETURN (line 530, no RESP, no HANDLE in COTRN02C) and never comes back. So the flag is always 'N' when this IF runs.
carddemo-tranadd COPY-LAST-TRAN-DATA:480 IF false G IF NOT ERR-FLG-ON after VALIDATE-INPUT-KEY-FIELDS and the STARTBR / READPREV / ENDBR of COPY-LAST-TRAN-DATA: each of them that sets WS-ERR-FLG to 'Y' (lines 198, 212, 225, 592, 599, 625, 632, 656, 663, 692) then PERFORMs SEND-TRNADD-SCREEN, which ends in EXEC CICS RETURN (line 530, no RESP, no HANDLE) and never comes back; READPREV ENDFILE (line 688) only zeroes TRAN-ID. So the flag is still the 'N' MAIN-PARA set (line 109).
carddemo-tranadd RETURN-TO-PREV-SCREEN:502 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 116 moves 'COSGN00C', line 138 'COMEN01C', and line 141 moves CDEMO-FROM-PROGRAM only after testing it is neither SPACES nor LOW-VALUES; both fields PIC X(08), COCOM01Y). COTRN02C never moves SPACES or LOW-VALUES into it in between.
carddemo-tranlist PROCESS-PAGE-BACKWARD:339 IF false G IF EIBAID NOT = DFHENTER AND DFHPF8: PROCESS-PAGE-BACKWARD is PERFORMed only from PROCESS-PF7-KEY (line 246), which MAIN-PARA PERFORMs only under WHEN DFHPF7 of EVALUATE EIBAID; COTRN00C never changes EIBAID, so EIBAID = DFHPF7 here and the condition is always true.
carddemo-tranlist PROCESS-PAGE-BACKWARD:361 IF false G IF NEXT-PAGE-YES: PROCESS-PF7-KEY does SET NEXT-PAGE-YES TO TRUE (line 242) just before PERFORM PROCESS-PAGE-BACKWARD, and nothing on the way (STARTBR / READPREV / POPULATE / INITIALIZE / SEND paragraphs) sets NEXT-PAGE-NO -- only PROCESS-PAGE-FORWARD does, which PF7 never runs. The flag is always 'Y' here.
carddemo-tranlist POPULATE-TRAN-DATA:390 EVALUATE OTHER C EVALUATE WS-IDX WHEN 1 .. WHEN 10: POPULATE-TRAN-DATA is PERFORMed only at line 300, inside PERFORM UNTIL WS-IDX >= 11 ... (line 297; WS-IDX moved 1 at line 295, +1 per row at line 301), and at line 354, inside PERFORM UNTIL WS-IDX <= 0 ... (line 351; WS-IDX moved 10 at line 349, -1 per row at line 355). The loop test runs before each pass, so WS-IDX is in 1..10 every time.
carddemo-tranlist INITIALIZE-TRAN-DATA:452 EVALUATE OTHER C EVALUATE WS-IDX WHEN 1 .. WHEN 10: INITIALIZE-TRAN-DATA is PERFORMed only by PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > 10 (lines 290 and 344), so WS-IDX is in 1..10 every time.
carddemo-tranlist RETURN-TO-PREV-SCREEN:512 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 108 moves 'COSGN00C' and line 123 'COMEN01C'; both fields PIC X(08), COCOM01Y). COTRN00C never moves SPACES or LOW-VALUES into it in between.
carddemo-tranview RETURN-TO-PREV-SCREEN:199 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (lines 95 and 126 move 'COSGN00C' / 'COTRN00C', line 117 'COMEN01C', and line 120 moves CDEMO-FROM-PROGRAM only after line 116 tested it is neither SPACES nor LOW-VALUES; both fields PIC X(08), COCOM01Y). COTRN01C never moves SPACES or LOW-VALUES into it in between.
carddemo-useradd RETURN-TO-PREV-SCREEN:167 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 79 moves 'COSGN00C' and line 94 'COADM01C'; both fields PIC X(08), COCOM01Y). COUSR01C never moves SPACES or LOW-VALUES into it in between.
carddemo-userdel RETURN-TO-PREV-SCREEN:199 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (lines 91, 113 and 124 move 'COSGN00C' / 'COADM01C', and line 116 moves CDEMO-FROM-PROGRAM only after testing it is neither SPACES nor LOW-VALUES; both fields PIC X(08), COCOM01Y). COUSR03C never moves SPACES or LOW-VALUES into it in between.
carddemo-userdel DELETE-USER-SEC-FILE:313 EVALUATE WHEN@323 R WHEN DFHRESP(NOTFND) after EXEC CICS DELETE DATASET(WS-USRSEC-FILE) (line 307) with no RIDFLD: it deletes the record READ-USER-SEC-FILE's READ ... UPDATE (line 269) holds, PERFORMed just before it (lines 190-191). IBM's DELETE raises NOTFND only when the RIDFLD search argument is not found (https://www.ibm.com/docs/en/cics-ts/6.x?topic=summary-delete); with no RIDFLD the failure is INVREQ.
carddemo-userlist PROCESS-PAGE-BACKWARD:342 IF false G IF EIBAID NOT = DFHENTER AND DFHPF8: PROCESS-PAGE-BACKWARD is PERFORMed only from PROCESS-PF7-KEY (line 249), which MAIN-PARA PERFORMs only under WHEN DFHPF7 of EVALUATE EIBAID; COUSR00C never changes EIBAID, so EIBAID = DFHPF7 here and the condition is always true.
carddemo-userlist PROCESS-PAGE-BACKWARD:364 IF false G IF NEXT-PAGE-YES: PROCESS-PF7-KEY does SET NEXT-PAGE-YES TO TRUE (line 245) just before PERFORM PROCESS-PAGE-BACKWARD, and nothing on the way (STARTBR / READPREV / POPULATE / INITIALIZE / SEND paragraphs) sets NEXT-PAGE-NO -- only PROCESS-PAGE-FORWARD does, which PF7 never runs. The flag is always 'Y' here.
carddemo-userlist POPULATE-USER-DATA:386 EVALUATE OTHER C EVALUATE WS-IDX WHEN 1 .. WHEN 10: POPULATE-USER-DATA is PERFORMed only at line 303, inside PERFORM UNTIL WS-IDX >= 11 ... (line 300; WS-IDX moved 1 at line 298, +1 per row at line 304), and at line 357, inside PERFORM UNTIL WS-IDX <= 0 ... (line 354; WS-IDX moved 10 at line 352, -1 per row at line 358). The loop test runs before each pass, so WS-IDX is in 1..10 every time.
carddemo-userlist INITIALIZE-USER-DATA:448 EVALUATE OTHER C EVALUATE WS-IDX WHEN 1 .. WHEN 10: INITIALIZE-USER-DATA is PERFORMed only by PERFORM VARYING WS-IDX FROM 1 BY 1 UNTIL WS-IDX > 10 (lines 293 and 347), so WS-IDX is in 1..10 every time.
carddemo-userlist RETURN-TO-PREV-SCREEN:508 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (line 111 moves 'COSGN00C' and line 126 'COADM01C'; both fields PIC X(08), COCOM01Y). COUSR00C never moves SPACES or LOW-VALUES into it in between.
carddemo-userupd RETURN-TO-PREV-SCREEN:252 IF true G IF CDEMO-TO-PROGRAM = LOW-VALUES OR SPACES in RETURN-TO-PREV-SCREEN: the paragraph is only PERFORMed, and every PERFORM of it comes right after a MOVE of a non-blank program name into CDEMO-TO-PROGRAM (lines 91, 114 and 125 move 'COSGN00C' / 'COADM01C', and line 117 moves CDEMO-FROM-PROGRAM only after testing it is neither SPACES nor LOW-VALUES; both fields PIC X(08), COCOM01Y). COUSR02C never moves SPACES or LOW-VALUES into it in between.
carddemo-userupd UPDATE-USER-SEC-FILE:368 EVALUATE WHEN@377 R WHEN DFHRESP(NOTFND) after EXEC CICS REWRITE DATASET(WS-USRSEC-FILE) (line 360): REWRITE has no RIDFLD and updates the record the READ ... UPDATE at line 322 holds; IBM's REWRITE conditions do not include NOTFND (https://www.ibm.com/docs/en/cics-ts/6.x?topic=summary-rewrite; our spec, gitgalaxy/standards/cics/commands/files.py, lists NORMAL and INVREQ).

Decisions for the owner (defaults applied, reversible)

  1. Responses z/OS never raises are stated (R), not faked.
    • The fault scenarios for REWRITE NOTFND (userupd 377, billpay 390) and for DELETE NOTFND with no RIDFLD after READ UPDATE (userdel 323) were removed.
    • The three outcomes are stated under R instead, citing IBM's REWRITE and DELETE pages and our spec's REWRITE outcomes.
    • To reverse: restore the scenarios from commit ccb4159 and drop the three R entries.
  2. COMMAREA values are input; the cardlist scenarios were kept.
    • enter-with-page-number-zero and pf8-at-the-last-page-flag-neither-shown-nor-not set COMMAREA-tail values COCRDLIC never writes itself.
    • In CardDemo's pseudo-conversational flow the COMMAREA arrives from the previous transaction, often another program, so it is treated as genuine input.
    • If you rule otherwise, 913 false becomes a C entry.
  3. DUPREC stands in for DUPKEY.

Follow-ups filed

Gates

pr_gates.py (venv ruff 0.16.0): lint, audits, secrets, xray, gauntlet, golden and suite all pass. pr_gates.py --ratchets: ports, port-surface, estate, fact-crosscheck, completeness and ground-truth all pass. The first run failed golden and ports only because it ran without equivalence_env.py --provision; both pass with the provisioned environment. Local det sweep: 16/16 proven, infeasible_outcomes.py check ok, det_coverage_ledger.py check as expected.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

squid-protocol and others added 6 commits October 7, 2026 12:06
… of control (#4602)

An IF / EVALUATE no path reaches -- every path to it passes GO TO, GOBACK, STOP RUN,
EXEC CICS RETURN / XCTL / ABEND (no RESP / NOHANDLE), or a plain PERFORM of a paragraph
no path leaves -- is counted apart (branches.after_transfer), like in_dead_code. A run
that takes one is flagged (after_transfer_but_taken). Conservative: conditional phrases,
inline PERFORMs, IF with no ELSE, EVALUATE with no OTHER, COPY and Area A lines keep
the path open. CardDemo: COCRDLIC 586, COCRDSLC 386, COACTVWC 387; crucible: none.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests/equivalence/infeasible_outcomes.json states, per case, the branch outcomes no input
can reach, each with its COBOL reason (family G: a guard every caller has satisfied; C: a
test of a constant). proof_blockers.py takes them out of the branch total when the proof
left them uncovered and prints them; one the proof reached is a gap. Every det sweep fails
when a proof reaches a stated outcome (proof_sweep.py keeps each case's uncovered list).
infeasible_outcomes.stated(case) is what the evidence report shows as assumptions.

First entries: the RETURN-TO-PREV-SCREEN guard (G) in nine CardDemo programs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ble entries for the rest (#4602)

Scenarios (every reachable outcome the harness can express): billpay +9, tranadd +15,
report +9, tranlist +11, userlist +11, cardlist +2, cardview +1, userupd +1, userdel +1.
Proposed infeasible entries (G / C, each with its COBOL reason): adminmenu 6, menu 3,
cardlist 2, cardview 6, report 6, tranadd 2, tranlist 4, userlist 4. Evidence records of
the changed cases re-proven (the model ports prove the new scenarios); pages re-rendered.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nd coverage ledger regenerated (#4602)

The REWRITE NOTFND (userupd 377, billpay 390) and DELETE-without-RIDFLD NOTFND (userdel 323)
fault scenarios are gone: IBM documents no such response, so the outcomes are stated
infeasible under family R, citing IBM's REWRITE / DELETE pages. Evidence records of the
9 changed cases re-proven with evidence.py prove, pages rendered, det_sweep_coverage.json
updated from a fresh det sweep (16 cases, all proven).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant