Repository navigation
Proofs compare DISPLAY / SYSOUT (#4056) and SEND MAP attributes (#4053) - #4061
Merged
Merged
Conversation
tests/tools/mutation.py breaks a proven port one small change at a time (ROR, COR, NEG, AOR, BDM, CON, LIT, RET, DEL), drops the mutants javac refuses against the baseline's classpath, and proves the rest with the equivalence harness, N at a time under a time limit. A survivor is an equivalent mutant or a place the case never looks. It writes mutation.json / mutation.md: the score, the runs that killed each mutant (the fault runs' share), and every survivor. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
A mutant differs from the proven port in one file, yet each proof redid the COBOL runs and regenerated the whole estate. equivalence.py run --reuse EARLIER takes EARLIER's COBOL outputs for each step whose run.sh is byte-identical, and EARLIER's generated project re-overlaid with the port (the same files, or it refuses), compiling only the port's files with the pom's javac options. --first-difference stops a batch proof at the first differing run: the same verdict, fewer runs named. mutation.py uses both by default; --full keeps the from-scratch proof as the reference, and `compare` checks the two agree mutant by mutant. TRNRPT under load: a killed mutant 12-17 s instead of 282 s; a survivor still needs every run. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
…current With --reuse, EquivalenceRunTest runs through the JUnit Platform launcher surefire itself drives (the same platform version, from the local repository), one fresh JVM per run, without Maven -- only when the main classes were compiled from the port and target/test-classes from this very test source (a snapshot each successful Maven run leaves); anything else goes back to Maven. The launcher class is compiled once and shared. TRNRPT smoke sample, same mutants, same verdicts: a survivor (all 25 runs) 270 s -> ~190 s under load; the date check's single-run proof ~50 s -> ~8-12 s. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
mutation.py run --only DIR re-judges exactly the mutants another run judged, so the fast mode is checked against a --full reference mutant by mutant. Result: 386 of 386 agree (CSUTLDTC 206, COMEN01C 150, and 10 each of TRNRPT / POSTTRAN / INTCALC with their fault runs). docs/language_status/mutation_testing.md: operators, fast mode and its validation, first scores, and what survives (case gaps, harness gaps #4053 / #4056, equivalent mutants). The porting-loop skill points to it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
…CodeQL) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
The batch proof compared datasets, the return code and the abend, never the job log: a port that DISPLAYed the wrong message, or none, was still proven (mutation testing, #4047). - COBOL side: the step's stdout is SYSOUT. GnuCOBOL and IBM write a signed zoned item (012- vs 01K) and a binary / packed item (-00007 vs 000P) differently, so tests/equivalence/faults/ggdisplay.c (preloaded in front of cob_display) writes those as IBM documents; anything it does not model (floating point) is marked GGDISPLAY-NOT-MODELLED and that run's SYSOUT is reported as not compared, never compared against GnuCOBOL's text. - Java side: a generated batch runtime class Sysout (display, displayNoAdvancing, number: IBM's text of a numeric item). The harness points it at a per-run file. - compare_run compares SYSOUT line by line, trailing blanks aside (a SYSOUT record is blank-padded) and libcob's own messages left out, in every run -- after an abend too. The loop's feedback shows the differing lines. - The port ticket: a DISPLAY is Sysout.display with IBM's exact text (was: "a DISPLAY becomes a log line"); Sysout.java is in the prompt's runtime. - The hand ports: CBACT04C (152 lines; it never DISPLAYed each TCATBAL record, and printed a 9x status wrongly) and CBTRN02C (54 lines) route every DISPLAY through Sysout. CBTRN02C's comparison found a defect of the original: closing DALYREJS reports XREFFILE-STATUS. Kept, documented. Both proven on every run again (20 and 29 runs). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
… options The CICS equivalence proof compared each screen's text only: a port that showed an error in the wrong colour, or never put the cursor in the field, was still proven (mutation testing, #4047: deleting the menu's `errmsgColor = DFHRED` survived). - COBOL side: from the symbolic map's bytes, per field, the attribute byte (<f>A / <f>F: one byte), extended colour (<f>C) and highlight (<f>H) and length -1 (<f>L: the cursor), plus the SEND MAP options and CURSOR value the stub logs. The harness's DFHBMSCA holds the EBCDIC bytes, so a byte is its value. X'00' is "not set" (BMS takes the map's own); so is a space: WORKING-STORAGE GnuCOBOL initialised where IBM leaves it undefined (a map the program never cleared) -- nothing is claimed about those bytes. - Java side: CicsTask already records MapSubfields, options and cursor (#4001); compare_events now compares them, in the same terms. - The account view hand port (COACTVWC) never set them: it now ports 1300-SETUP-SCREEN-ATTRS (DFHBMFSE, the cursor, red on a bad or missing filter, the info line's colour) and SEND MAP CURSOR ERASE FREEKB. Proven again on all 11 scenarios; the menu (COMEN01C, the loop's port) was already right and stays proven. The CICS crucible compares subfields in its own pipeline since #4001. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
…ISPLAY model against IBM's text Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
…rule The committed CBTRN03C port (the loop's, 2026-09-30) logged its DISPLAYs, as the ticket then said: not proven once SYSOUT is compared. A model's port is never hand-edited, so the loop ran again from scratch on the new ticket: claude-sonnet-5-5, proven on attempt 2 (447/447 report records, 264/264 SYSOUT lines, 24/24 fault runs). Attempt 1 read the records as IBM037 instead of the data's ISO-8859-1 -- the ticket never states the records' code page -- and the SYSOUT feedback showed it. Unedited; the provenance records both attempts and what it supersedes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Contributor
This was referenced Oct 1, 2026
Closed
10 tasks
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.
Closes #4056 and #4053, two gaps in what the equivalence proofs compare, both found by mutation testing (#4047, epic #4055).
#4056: batch proofs now compare DISPLAY / SYSOUT
Before, a port that wrote the wrong job-log message, or none, was still proven.
COBOL side. The step's stdout is SYSOUT. GnuCOBOL and IBM write two kinds of item differently:
012-vs IBM's01K;-00007vs IBM's000P.tests/equivalence/faults/ggdisplay.cis preloaded in front ofcob_displayand writes those as IBM documents. An operand it does not model (floating point) is markedGGDISPLAY-NOT-MODELLED, and that run's SYSOUT is reported as not compared. It is never compared against GnuCOBOL's text.Java side. A generated batch runtime class
Sysout(display,displayNoAdvancing, andnumberfor IBM's text of a numeric item). The harness gives each run its own SYSOUT file.Comparison.
compare_runcompares SYSOUT line by line in every run, including after an abend. Trailing blanks are ignored (a SYSOUT record is blank-padded), and so are libcob's own messages. The loop's feedback shows the differing lines. A case can opt out with"sysout": false.Ticket. A DISPLAY is now
Sysout.displaywith IBM's exact text (it was "a DISPLAY becomes a log line").Sysout.javais in the prompt's runtime.Ports
XREFFILE-STATUS. The defect is kept in the port and documented.#4053: CICS proofs now compare a SEND MAP's attributes, colour, highlight, cursor and options
Before, a port that showed an error in the wrong colour, or never placed the cursor, was still proven.
COBOL side. From the symbolic map's bytes, per field:
<f>A/<f>F);<f>C);<f>H);<f>L: the cursor goes there);plus the options and CURSOR value the stub logs. X'00' means "not set". So does a space: that is WORKING-STORAGE GnuCOBOL initialised, where IBM leaves it undefined, and no claim is made about it.
Java side.
CicsTaskalready recordedMapSubfields, options and cursor (CICS harness: BMS output fidelity in the stub and CicsTask (unlocks 6 cobol-stub cells, all hx-*) #4001).compare_eventsnow compares them.COACTVWC (hand port) never set them. It now ports 1300-SETUP-SCREEN-ATTRS and
SEND MAP ... CURSOR ERASE FREEKB, and is proven on all 11 scenarios. COMEN01C (the loop's port) was already right.The CICS crucible has compared subfields in its own pipeline since CICS harness: BMS output fidelity in the stub and CicsTask (unlocks 6 cobol-stub cells, all hx-*) #4001, so it is unchanged.
Tests
tests/cobol_mainframe/test_equivalence_sysout_attrs.py: the SYSOUT rules, the not-modelled refusal, comparison after an abend, the ticket rule, the subfield comparison, unset subfields, and the DISPLAY model against IBM's documented text (Docker,EQUIVALENCE_E2E=1).EQUIVALENCE_E2Eproofs of the committed loop ports pass, as does the fulltests/tree locally (13,207 passed).Mutation scores after these fixes (fast mode, #4047)
errmsgColor = DFHREDdeleted, and a message literalThe batch samples are not a clean before/after: the earlier batch samples were 8 mutants each, and the ports themselves changed here. The job-log mutants that used to survive (a changed
ERROR OPENING ...literal, a deleteddisplayIoStatus) are killed now. What still survives in batch is mostly equivalent mutants (a rounding mode on a value already at its scale) or boundaries the cases never test (an expiry date equal to the transaction date; a non-numeric file status). The menu's survivors are case gaps: options and user types no scenario picks. That is the test-strengthening loop's job (#4049), not this PR's.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ