Skip to content

det translator: 32 programs refused across the keyed corpora and estate-crucible (code pages, free format, multi-program sources, grammar gaps); KYUYJP crashes #4462

Closed

Description

@squid-protocol

Problem

The det translator refuses (cleanly, per #4411) 32 of the 168 sources the #4273 cross-check reads (one of them a copybook the key lists as a program). Each refusal is safe, but each is a program with no translator facts and no translation. One crashes instead of refusing. This issue lists them by cause so each can be fixed or accepted.

Evidence (origin/main e3ace8a; fact_crosscheck.py run, ledger causes translator-refuses-*)

Code pages the estate declares (estate-crucible key/manifest.json code_pages; the engine reads them through --source-encoding): apps/DEUT/cobol/ZINSBER.cbl (cp273), apps/GULF/cobol/GULFINQ.cbl (cp037), apps/KYUY/cobol/KYUYO01.cbl (cp930), apps/NORD/cobol/KØBREG.cbl (cp277), apps/KYUY/cobol/KYUYO02.cbl (shift_jis): DATA DIVISION fails at line 1.
A crash, not a refusal: apps/KYUY/cobol/KYUYJP.cbl (national / DBCS names) raises UnicodeEncodeError: 'latin-1' codec can't encode from layout.parse and stmt.parse.
Free-format source: apps/MODN/cobol/MODRATE.cbl, apps/PCED/cobol/PCEDFREE.cbl (>>SOURCE FORMAT FREE).
Other estate-crucible shapes: apps/LOAN/cobol/LNCALC.cbl (PROGRAM-ID LNCALC. with no period after PROGRAM-ID), apps/LOAN/cobol/LNIDMS01.cbl (IDMS), apps/PAYR/cobol/PAYMAIN.cbl (several programs in one source: the procedure side runs paragraph 0200 to line 82 through the nested PAYCALC / PAYRPT), apps/RPTS/cobol/RPTHDR.cbl (DATA DIVISION line 18).
Grammar gaps on the keyed corpora: CardDemo COPAUS1C.cbl (no open EVALUATE), DBUNLDGS.CBL, PAUDBLOD.CBL, PAUDBUNL.CBL, CBIMPORT.cbl (PROCEDURE DIVISION), CBSTM03A.CBL (DATA DIVISION line 168); GenApp lgtestc1.cbl, polloo2.cpy; DSF FO04D1X1, FO04F1X1, PLUKKFR, PLUKKFRN (DATA DIVISION), R001BYDL (PROCEDURE DIVISION).
Vendor copybooks not in the estate (not a translator defect; listed for completeness): CardDemo COPAUA0C, COACCT01, CODATE01 (IBM MQ CMQ*), CBSA CRECUST (LE CEEIGZCT).

Impact on a real estate

No wrong facts (refusals are never silent), but coverage: on the synthetic estate 15 of 40 programs are refused. KYUYJP's crash should become a named refusal.

Acceptance criteria

  • KYUYJP refuses by name instead of raising UnicodeEncodeError.
  • Decide per cause: model it (code pages via the estate's declaration, free format) or keep the refusal and say so in det_port_design.md.
  • Each fixed cause drops its translator-refuses-* entries from tests/cobol_mainframe/fact_crosscheck_ledger.json.

Found during: #4273 engine-vs-translator fact cross-check (PR #4456)

🤖 Generated with Claude Code

Activity

  1. added
    bug
    legacy-modernization
    priority: high
    on Oct 5, 2026
  2. squid-protocol commented on Oct 6, 2026

    @squid-protocol
    OwnerAuthor

    Slice 2 (#4535): re-surveyed the translator-refuses-grammar ledger causes. Fixed: ENTRY 'DLITCBL' (DBUNLDGS, PAUDBLOD, PAUDBUNL; R001BYDL moves to its next gap), FUNCTION f (1:4) (KØBREG, CBIMPORT), lower-case x'00' (lgtestc1). Also: continued hex literals, IDMS refused by name (#4532), and multi-program sources as units (PAYMAIN is still blocked first by #4486).

    Still refused (translator-refuses-grammar, 6 entries after this PR, down from 12), with counts:

    gap count programs
    SEARCH ALL ... WHEN (the statement builder reads WHEN as EVALUATE's: "no open EVALUATE") 1 CardDemo COPAUS1C
    DSF's alphabet without the ALPHABET keyword (C01 IS KANAL-1, IDIOT IS 'ABC...ÆØÅ', COBOL-74 SPECIAL-NAMES) 2 DSF PLUKKFR, PLUKKFRN
    LABEL RECORD ARE STANDARD (singular RECORD with ARE; the grammar wants RECORD IS / RECORDS ARE) 1 DSF FO04D1X1
    OS/VS COBOL EXHIBIT NAMED (after ENTRY was fixed, the next gap) 1 DSF R001BYDL
    a missing period after 03 CA-CUSPOL-REQUEST (a source defect the engine tolerates; refusal is right) 1 GenApp polloo2.cpy (keyed copybook)

    Fixed in this slice: ENTRY 'DLITCBL' USING (4: DBUNLDGS, PAUDBLOD, PAUDBUNL, R001BYDL's first gap), a reference modification of an intrinsic function, FUNCTION CURRENT-DATE (1:4) (2: KØBREG, CBIMPORT), lower-case x'00' (1: lgtestc1). KØBREG's next gap, MOVE ALL X'00', is read too.

  3. added
    scope:core
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglegacy-modernizationpriority: highscope:core

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions