Repository navigation
TRUNC(STD), IBM's default, on both sides of every proof (fixes #4102) - #4140
Merged
Merged
Conversation
…te; det sets each entry's TRUNC, restores the caller's) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
Contributor
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ
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.
What
Fixes #4102. IBM Enterprise COBOL's default
TRUNC(STD)now applies on both sides of every proof. Until now both sides ranTRUNC(BIN): they agreed with each other, and both differed from IBM.COBOL side (harness). An option nothing names takes IBM's default (
compiler_options.DEFAULTS).TRUNC(STD)maps to GnuCOBOL's-fbinary-truncate. Measured ongitgalaxy-gnucobol:3:MOVE 99999toS9(4) COMPgives +09999;ADD 1to 9999 raises SIZE ERROR;COMPUTE 12345stores +02345.-std=ibmalone keeps the binary item's bytes, which isTRUNC(BIN).Java side (det port). Each entry point (
runTask/runBatch/handleCall) sets its program's TRUNC and restores the caller's in afinally(Cobol.swapTruncBinary), so a LINK or CALL into a program compiled otherwise doesn't leak. The program's TRUNC comes from its CBL / PROCESS cards, else the case'scompiler_options, else STD. CBSA's programs sayPROCESS ... TRUNC(STD); CardDemo's compile procs name none.Register C1 is now MATCHED.
Re-proven
Every case, since the oracle itself changed:
carddemo-cardupdatewas recorded as not proven in Porting loop at scale: baseline-reuse proofs, run-many, adopt; COCRDUPC recorded as not proven #4085 (blanks in aPIC 9(3)CVV).carddemo-intcalc-generated's generated card numbers mix letters and digits, so ASCII and EBCDIC key order pick different duplicates (register D1).--faults all).Tests
pr_gates.py --fast: 5/5 pass.-fbinary-truncate.test_each_entry_runs_with_its_programs_trunc.🤖 Generated with Claude Code
https://claude.ai/code/session_01RZE6us7fUL6Hynk59rWLvZ