Repository navigation
Closed
Labels
era:2Era CICS/MVS-ESA, COBOL II/85: RESP, SQL, DPL (~1988-96) (era_tags.py)scope:coreBlocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial
Description
What. IBM Enterprise COBOL's default TRUNC(STD) is running as TRUNC(BIN) on both sides of every proof, so the proofs agree with each other and differ from IBM in the same way.
Evidence (2026-10-02, gitgalaxy-gnucobol:3, GnuCOBOL 3.1.2), with PIC S9(4) COMP:
| flags | MOVE 99999 (via a zoned item) |
ADD 1 to 9999 |
COMPUTE = 12345 |
|---|---|---|---|
-std=ibm (what the harness passes for STD) |
-31073 (bytes wrapped) | +10000, no SIZE ERROR | +12345 |
-std=ibm -fnotrunc (TRUNC(BIN)) |
-31073 | +10000 | +12345 |
-std=ibm -fbinary-truncate |
+09999 | SIZE ERROR | +02345 |
-fbinary-truncate gives IBM's TRUNC(STD) results.
Where.
tests/tools/equivalence_common.COBC_OPTIONSmaps("TRUNC", "STD")to""(no flag), on the belief that STD is GnuCOBOL's own behaviour under-std=ibm.- The det runtime's
Cobol.setTruncBinarydefaults to off (BIN). gitgalaxy.core.compiler_options.DEFAULTS["TRUNC"]is"STD".
Who asks for STD.
- CBSA: every program starts
PROCESS CICS,NODYNAM,NSYMBOL(NATIONAL),TRUNC(STD). The proven casescbsa-updcustandcbsa-abndprocare among them. - CardDemo: the compile PARMs (
samples/proc/BUILDBAT.prc,BUILDONL.prc) name no TRUNC, which means the installation default (STD as shipped).
Reach. Only where a binary item receives more digits than its PICTURE. Not yet measured for the proven programs.
Plan.
- Map
TRUNC(STD)to-fbinary-truncate. - The det translator calls
Cobol.setTruncBinary(true)when the program's effective TRUNC is STD. The model-port tickets state the rule. - Re-prove every case (
det_port.py run --all-cases, plus the model ports) and report which proofs move. - Update entry C1 of
docs/language_status/oracle_assumptions.md.
Found while writing the oracle-assumptions register (#4051, epic #4055).
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
era:2Era CICS/MVS-ESA, COBOL II/85: RESP, SQL, DPL (~1988-96) (era_tags.py)scope:coreBlocks a burned-estate program's next evidence rung, or the 4th-estate one-shot trial
Activity
Oracle assumptions register, det_port.py check, and the det-port skill (
TRUNC(STD), IBM's default, on both sides of every proof (fixes #4102) (…