Repository navigation
#3830: the equivalence oracle is no more lenient than COBOL - #3853
Merged
Merged
Conversation
decode_field read a DISPLAY numeric with int(), which takes spaces, `+`, `_` and non-ASCII digits: " 12" equalled "0012". The diff compared decoded values only, so a C vs F sign nibble or -0 vs +0 passed as equal though the files differ. - decode_field: DISPLAY digits must be ASCII 0-9 after the sign is resolved; COMP-3 nibbles must be 0-9 with an a-f sign; anything else is <invalid ...>, as a NUMERIC test would say - SIGN IS SEPARATE: the flag now travels from the copybook layout to the decoder, which reads the `+`/`-` byte at either end -- it had only worked because int() takes a leading sign (a trailing one read as invalid) - diff_records: same value, other bytes is a difference, marked "raw" and shown as hex; report_markdown labels it "(bytes; same value)" - the CICS harness passes the separate-sign flag too Proven ports re-run end to end under the strict oracle (EQUIVALENCE_E2E=1, JDK 17): CBACT04C, CBACT04C on generated inputs, and the COACTVWC CICS view all still equal. Mainframe suite green. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
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.
Closes #3830 (epic #3819).
Why
The equivalence harness is the oracle behind every "the Java port equals COBOL" claim, and it was more lenient than COBOL in two ways:
decode_fieldparsed DISPLAY numerics withint(), which accepts spaces,+,_and non-ASCII digits. So" 12"equalled"0012", and١٢read as 12.What
0-9once the sign is resolved;0-9, with ana-fsign nibble;<invalid …>, as a COBOL NUMERIC test would say.SIGN IS LEADING/TRAILING SEPARATEfields only decoded becauseint()happens to accept a leading+/-; a trailing sign read as invalid. The flag now travels from the copybook layout to the decoder, which reads the sign byte at either end."raw": trueand shown as hex. The Markdown report labels it "(bytes; same value)". The CICS harness passes the separate-sign flag too.Verified
" 12",+012,1_2, Arabic-Indic digits and bad COMP-3 nibbles are invalid;Note for running the end-to-end proofs locally: set
JAVA_HOMEto a JDK 17 andGITGALAXY_MAINFRAME_CORPORAto a checkout's.mainframe_corpora.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g