Skip to content

det: listing control, code pointers, JSON / XML holes; cut literals refused by name (#4462 slice 4) - #4590

Merged
squid-protocol merged 3 commits into
mainfrom
fix/4462-det-grammar-slice4
Oct 6, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
fix/4462-det-grammar-slice4

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Part of #4462 (slice 4). Picked by cics_census.py blockers (#4587): the whole-program refusals ExprError: the PROCEDURE DIVISION does not parse (5 non-burned), LayoutError: DATA DIVISION does not parse near expanded line(…) (1 burned + 1 non-burned) and ExprError: paragraph_header does not parse (1 non-burned).

Constructs behind those refusals

program(s) construct outcome
cics-java-jcics-samples EC01 EJECT after a paragraph's EXIT. modelled: EJECT / SKIP1-3 / TITLE literal (listing control, the only statement on its line) are dropped with the comment lines
cics-java-recgen EDUPGM TITLE '...' before the IDENTIFICATION DIVISION modelled (same)
DBB MortgageApplication epscsmrd (burned) USAGE PROCEDURE-POINTER modelled: PROCEDURE- / FUNCTION-POINTER laid out as POINTER (8 bytes; oracle_assumptions C9 now says IBM's function pointer is 4)
epscsmrd (next, burned) SET ROUTINE TO ENTRY 'X' hole by name (SET TO ENTRY: procedure / function pointers are not modelled)
cics-java-liberty-loans-and-scoring GETQUOTE, GETSCORE JSON PARSE / JSON GENERATE hole by name, XML PARSE / GENERATE as well (name matching, conversions, JSON-CODE / XML-CODE not modelled); the statements around them translate
NexusBank NBON, NMNU, NWIT a literal cut at column 72: its closing quote (and period) in columns 73+ refused by name: source defect: source text past column 72 (…) cuts a literal open: fixed-form COBOL reads columns 8-72 only. IBM cuts there too, so this is not accepted silently; a continued literal (sequence numbers in 73-80) and >>SOURCE FORMAT FREE are read as before. The same check covers NexusBank NACC, NDEP, NEXS, NMOD-CUST, NSTMT-GEN once #4588 lifts their national-text refusal (checked: each names its line)
cics-java-recgen EDUCPY.cbl a copybook's data entries saved as .cbl (no PROGRAM-ID) refused by name: no PROGRAM-ID: a member to be copied, not a program (program_unit)

The remaining #4462 issue-body grammar items (CardDemo COPAUS1C, DBUNLDGS, PAUDBLOD, PAUDBUNL, CBIMPORT, CBSTM03A; GenApp lgtestc1; DSF) all translate on main today. None of them share a root cause with these. Only the vendor copybooks are left (CMQ*, CEEIGZCT).

Survey (all CICS programs, burned + census; origin/main d7ad333 vs this branch)

cics_census.py blockers, before:

translated whole: 69 / 125 (non-burned 13 / 31); refused whole (no statements translated): 19

after:

translated whole: 70 / 125 (non-burned 14 / 31); refused whole (no statements translated): 14

After merging main with #4588 (the wide-character fix, merge 11f0bd7), with both changes in:

translated whole: 70 / 125 (non-burned 14 / 31); refused whole (no statements translated): 12

NexusBank: NACC, NDEP, NEXS, NMOD-CUST and NSTMT-GEN are no longer refused for national text. Each is now refused by name at its column-72 cut, as NBON, NMNU and NWIT are, e.g. NSTMT-GEN.cbl:438: source defect: source text past column 72 (trobancariofinanziario.it') cuts a literal open. With both PRs in, the top blocker is source defect: source text past column 72 at 7 non-burned programs (NSTMT-GEN is not among them). It refuses each whole program, so 7 is an upper bound on what it would unblock. That defect is in the estate's own source; it is not a translator gap.

Per program: EC01 went from refused to 17/17 (whole). GETQUOTE went from refused to 31/37, and GETSCORE to 42/48 (holes: JSON PARSE/GENERATE, EXEC CICS WEB OPEN/CONVERSE/WRITE/READ/RECEIVE/SEND). EDUPGM went from refused to 22/25 (holes: IF EIBCALEN: no such item, an EXEC CICS with no reason given). epscsmrd went from refused to 38/58 (CEE* calls, GETMAIN, container browse / SET / CCSID, SOAPFAULT, pointers). NBON, NMNU and NWIT are now refused by name as source defects, and EDUCPY as not a program.

Next gaps for these programs: EXEC CICS WEB * (GETQUOTE / GETSCORE), JSON PARSE / GENERATE, EIBCALEN: no such item and an unnamed EXEC CICS hole in EDUPGM, LE callable services / container browse in epscsmrd.

Checks

  • New tests in tests/cobol_mainframe/test_det_source_4462.py (each starts with importorskip("tree_sitter_language_pack")). They failed first, then passed.
  • pr_gates.py --ratchets (re-run after the merge): ports, port-surface, estate, fact-crosscheck, completeness and ground-truth all PASS. Ports ran against a private cics-crucible clone at the v0.5.0 pin, because the shared checkout is off-pin. No ledger entry moved: no translator-refuses-* entry covers these programs.
  • Full pr_gates.py: 7/7 pass (lint, audits, secrets, xray, gauntlet, golden, suite).
  • Det sweep: a translator change triggers a full sweep in CI (det-sweep.yml); I did not run it locally.

Note: the census warned that cics-java-jcics-samples is not on estate4_draw.py's census list. It was already surveyed by #4587, and I read only EC01's failing line.

🤖 Generated with Claude Code

https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

squid-protocol and others added 2 commits October 6, 2026 18:59
…s; cut literals and copybooks refused by name (#4462 slice 4)

Ranked by `cics_census.py blockers` (the whole-program refusals "PROCEDURE DIVISION does not parse",
"DATA DIVISION does not parse", "paragraph_header does not parse"):

- EJECT, SKIP1/2/3 and TITLE literal (listing control, the only statement on their line) are dropped with the
  comment lines (an EJECT after a paragraph's EXIT; a TITLE before the IDENTIFICATION DIVISION).
- USAGE PROCEDURE-POINTER / FUNCTION-POINTER are laid out as POINTER (8 bytes; oracle_assumptions C9 notes
  IBM's function pointer is 4).
- JSON PARSE / GENERATE, XML PARSE / GENERATE (with their exception phrases) and SET p TO ENTRY x are holes by
  name, so the statements around them translate.
- Refused by name: a literal left open at column 72 with text in columns 73-80 and no continuation (a source
  defect: fixed-form COBOL does not read columns 73-80), and a source with no PROGRAM-ID (a copybook saved as a
  program).

Part of #4462

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
…slice 4)

The text past column 72 can run beyond column 80 (NexusBank NSTMT-GEN), so the refusal quotes it as text past
column 72, not columns 73-80. It also covers NACC, NDEP, NEXS, NMOD-CUST and NSTMT-GEN once their national-text
refusal (#4588) is lifted.

Part of #4462

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging labels Oct 6, 2026
…lice4

Conflict: det/stmt.py's import list -- kept both cut_literal (this branch) and narrowed (#4588).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 6, 2026 23:56
@squid-protocol
squid-protocol merged commit 705dcc8 into main Oct 6, 2026
37 checks passed
@squid-protocol
squid-protocol deleted the fix/4462-det-grammar-slice4 branch October 6, 2026 23:56
squid-protocol added a commit that referenced this pull request Oct 7, 2026
…on, unmask, pr_check (#4270, 1 of 2) (#4596)

* tooling: blocker baseline cache, history, provision, unmask (#4270)

- cics_census survey --baseline: one survey per main SHA with that commit's
  own translator, cached at <root>/census-cache/<sha>/ (a no-op once cached,
  locked); blockers --baseline and compare --before-baseline read it.
- cics_census history append/show: docs/language_status/blockers_history.jsonl,
  seeded with #4587 / #4590 / #4592 (approximate SHAs, noted) and #4593.
- equivalence_env --provision: private cics-crucible at the pin + census
  clones (INELIGIBLE_LIST minus burned; estate4 candidate names refused),
  provision.json with SHAs, the exports; --check WARNs on an off-pin shared
  checkout.
- blockers --unmask GAPKEY: what-if re-translation of the programs one
  whole-program refusal stops, with that check off via det.source.survey_unmask
  (survey-only; det_survey.py is its only caller).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

* cics_census: --no-census reads no $CICS_CENSUS_CORPORA either (survey, usage, compare, blockers) (#4270)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

* cics_census: --no-census with --census-corpora is an error; regression test over survey, usage, compare (#4598)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_011wnQoeeAZP4npeyGnDviK6

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
squid-protocol added a commit that referenced this pull request Oct 9, 2026
…ed items) instead of reporting them confusingly (Fixes #4735) (#4747)

Text past column 72 of a fixed-form line that carries code punctuation (a host
variable cut short, a lost separator comma) is a named refusal, as the cut
literal of #4590 is; identification-area tags and *> comments are not flagged.
A saved ISPF editor screen is NotCobol in the translator and is named by the
refactor controller and the survey (was SystemExit: 0). A name no data entry,
COPY or INCLUDE declares is `undeclared item` / `undeclared paragraph`; the
CICS / DL/I interface names stay `no such item`. Nothing is repaired.


Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unintended behavior or logic failure in the engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant