Repository navigation
equivalence: non-digit zoned data as MOVE sender, operand, comparand; the oracle's sign rewrite (#4662) - #4693
Merged
Merged
Conversation
Eleven GenApp programs whose only proof gap was 'no case': - the front ends LGACUS01, LGAPOL01, LGDPOL01, LGICUS01, LGIPOL01, LGUCUS01, LGUPOL01, each running its whole back-end chain (Db2 service, VSAM service, LGSTSQ) in the task, with the back-end cases' inputs plus the front end's own paths (no COMMAREA, short COMMAREA, wrong request id); - the BMS test transactions LGTESTP1-4 (SSMAP maps, twelve programs per task): inquire / add / delete / update, CLEAR, PF3, MAPFAIL, bad option. Harness / translator fixes, each with a test: - stage_copybooks no longer stages a .bms map source as <NAME>.cpy (it shadowed the generated symbolic map COPY SSMAP means); - a program with no DFHCOMMAREA still gets EIBCALEN from the task's area (LGTESTP's IF EIBCALEN > 0 GO TO A-GAIN); - an integer literal compared with an alphanumeric item keeps its digits as written (ENP4CNOO Not = 0000000000); - each LINKed SQL program's GG-SQL-IDs start at the next free hundred (1000 x its place ran past PIC 9(4) at the tenth program); - ggsql.c refuses a statement the CLI fails in the client (-99999, Q10). LGTESTP4's successful add is left out: #4652 (C11). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-end cases (#4270) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inary item (#4652) GnuCOBOL 3.1.2 (cob_move_display_to_binary) counts each byte of a zoned sender as its character minus '0' (a space -16) in a wrapping unsigned 64-bit integer, keeps the receiver's digits under TRUNC(STD), then applies the sign. The det runtime read spaces as 0, so GenApp LGTESTP4's add INSERTed BROKERID 0 where the oracle INSERTs 931773840. Cobol.move now models it for a zoned sender holding a non-digit (digit-only data is unchanged); a sign byte that is no digit, sign or space is refused by name. IBM documents no result: register C11 updated. genapp-lgtestp4 gains its successful add (PROVED, 25 scenarios); the 27 ports with a zoned-to-binary MOVE re-proved. Follow-up: #4662. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rand, and the oracle's sign rewrite (#4662) Models what GnuCOBOL 3.1.2 (-std=ibm) does with a zoned item holding spaces, letters, low-values or X'FF': MOVE to zoned (byte copy), numeric-edited (only '0' suppressed), packed and binary; COMPUTE / ADD / SUBTRACT operands (cob_decimal_set_display, cob_get_int for cob_add_int); comparisons (cob_cmp_numdisp / the decimal); and the GET_SIGN / PUT_SIGN rewrite of a signed sender's sign byte, digit-only data included. New cobolrt/Zoned.java; C11 lists each shape with its libcob function; tests per sender shape against cobc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
…'s unsigned-overpunch value (#4662) The #4662 sign rewrite (PUT_SIGN) mutates a signed zoned item on read, so the probe's reused items changed between the NOPFD and PFD passes; items are now built per pass. An overpunch letter in an unsigned item is a C11 non-digit (12C = 139 under NOPFD); PFD still refuses it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
…er merging main (#4652) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
…fix/4662-nondigit-zoned
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
…#4662) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
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.
Fixes #4662. Part of #4270.
stacked on #4663 (→ #4653) — merge those first.
What. The rest of register C11: a zoned item holding non-digits (spaces, letters, low-values, X'FF') is modelled as GnuCOBOL 3.1.2 (
-std=ibm) reads it, per shape, measured against cobc over unsigned / SIGN TRAILING / LEADING / TRAILING SEPARATE / LEADING SEPARATE senders. IBM documents no result for such data; C11 says so and lists each shape with its libcob function.0123→012C);!+1, X'FF' +0, space stays a spacecob_get_sign/cob_put_sign1A3stays1A3)store_common_regioncob_move_display_to_editedcob_move_display_to_packedcob_decimal_set_display(skip leading low-nibble-0 bytes, u64 wrap; first byte FF / 00 = ±10^size)ADD x TO y/SUBTRACT x FROM y, x ≤ 9 digits (not COMP under TRUNC(STD))cob_add_int (y, cob_get_int (x))IF x = 0,>,<,IS POSITIVEcob_cmp_numdisp(unsigned / trailing sign, no decimals) or the decimalcob_move_display_to_binary!/ X'FF' signs; a bad SEPARATE sign still refusedADD 1 TOspaces)Tests:
tests/cobol_mainframe/test_det_nondigit_zoned.py— per sender shape x ~24 operations x cases, port ==nondigit_zoned_expected.txtunder TRUNC(STD) and TRUNC(BIN); withEQUIVALENCE_E2E=1the file is re-checked against cobc (26 pass with Docker). All 10 shape tests fail on the base, pass here.Shared functions touched (siblings #4654 / #4677 / #4686 / #4666 / #4668 / #4685):
Cobol.move(Field,Field,Charset)(split intomove+moveBytes; the sign GET/PUT around it),Cobol.nonDigitToBinary(reads aZoned.Raw),Cobol.num(zoned operand),Cobol.compare(Field,Field),compare(Field,BigDecimal),compareFigurative(ZEROS)(viacmpNum), newCobol.intOperand/cmpNum.Editing.format: an overload withrawDigits/negative; the old signature delegates (3 changed lines inside).gen.py:arith(ADD/SUBTRACT int path),reland the sign-class condition (cmp_num), newint_operand.cobolrt/Zoned.java. Not touched:Cobol.store(binary path, det runtime: a result overflowing a binary receiver's bytes (no ON SIZE ERROR) is stored unlike GnuCOBOL #4684).Evidence.
det_port.py checkvs #4663: all 79 ports change (runtime file), 30 services change (ADD/SUBTRACT/compare calls);det_port.py runof those 30: 28 proven, 2 not proven —carddemo-cardupdate,carddemo-intcalc-generated, bothKNOWN_UNPROVENalready. No verdict regression (GenApp LGTESTP1-4 ran on local Db2).pr_gates.py --fast5/5;--ratchets7 pass, 0 fail, 0 skipped;evidence_report.py --checkclean.Follow-ups filed: #4690 (hex literal X'0A'/X'0D' breaks the emitted Java), #4691 (DISPLAY of bytes > X'7F': UTF-8 vs raw), #4692 (non-digit receiver, P-scaled sender). Note: digit-only programs change too — a signed zoned sender's sign byte is rewritten as the oracle does.
🤖 Generated with Claude Code