Repository navigation
det port: pointer table (POINTER OCCURS) element SET idioms (Part of #5079) - #7388
Merged
Merged
Conversation
…5079) Each element of a USAGE POINTER under OCCURS is its own 8-byte handle: SET tbl(i) TO ADDRESS OF x, SET ADDRESS OF rec TO tbl(i), SET tbl(i) TO NULL, GETMAIN SET / FREEMAIN DATAPOINTER on an element. A table named without subscripts, the wrong subscript count and ADDRESS OF an element are refused by name. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
|
No description provided. |
Contributor
This was referenced Nov 1, 2026
squid-shepherd Bot
pushed a commit
that referenced
this pull request
Nov 1, 2026
… (#7430) Co-authored-by: Claude Sonnet 5.5 <[email protected]>
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.
Part of #5079. Slice 1 of the issue: the pointer-table lane (a
USAGE POINTERunderOCCURS). WAIT EXTERNAL / WAITCICS are slice 2 (below).What changed
det/stmt.py:SET <ref> TO ADDRESS OF xandSET ADDRESS OF rec TO <ref>accept a subscripted pointer (TBL(I),TBL(I, J)).det/gen.pypointer_item: compares the OCCURS depth with the subscript count; a table named without subscripts (it would silently be its first element) or with the wrong count is refused by name.SET tbl TO NULLon a bare table is refused too.det/cics.pypointer(): GETMAIN SET / FREEMAIN DATAPOINTER / WEB RECEIVE SET take an element.docs/language_status/register/X47.md: the pointer-table entry (assumptions, refusals). Each element is its own 8-byte handle (Field.at); a handle is still not an address. No runtime Java change; GnuCOBOL holds POINTER OCCURS natively, so no oracle change.tests/cobol_mainframe/test_pointer_table_5079.py(22 tests): translation of every idiom for a table, a table in a group and a table of groups; each refusal by name; a compiled-Java run (JDK-gated) showing independent slots, a NULL element, aliasing through a group copy and a freed element refused.Class / Sibling gaps
Class: a pointer-lane operand that is not a plain scalar
USAGE POINTERitem. Done here: a subscripted element in every pointer idiom (SET both ways, SET NULL, GETMAIN SET, FREEMAIN DATAPOINTER, RECEIVE SET). Still refused by name:SET ADDRESS OF rec TO ADDRESS OF tbl(i)(an element is not modelled as an address target), a pointer table a REDEFINES overlays, a qualified pointer name. No burned-estate program needs any of them (none declares POINTER OCCURS).Remaining slices
Slice 2: WAIT EXTERNAL / WAITCICS model (ECBLIST read from the pointer table, NUMEVENTS, INVREQ RESP2 1-5, posted ECB bit X'40' as a register assumption; CicsTask, DetCics, stub
ggcics.c/equivalence_cics*.py,api.py, X63, a cics-crucible case). It exceeds this PR's five-hand-written-file cap. No burned-estate program issues either command.Plan deviation
program.pyis unchanged: itspointer_view_of/overlaid_pointers/write_only_pointersguards were already safe for tables. One hand-written file is also fewer than planned.Evidence
tests/cobol_mainframepointer / det_translate / whole-program / equivalence_cics: 1138 passed, 19 skipped.det_port.py check: 236/236 ports unchanged.crucible_check.py: both legs PASS (zero golden diff).audit_check.pyclean;pr_gates --fast9/9 pass.Facts checked:
_occurs_chaindepth drives the subscript check; the 4771 / 5042 tests pin the "not a plain USAGE POINTER item" message, kept as a prefix;test_det_translate.pystubs the generator and binds onlypointer_item, so the parse lives incics.py.Lessons for agents
test_det_translate.pyG) binds onlypointer_item: a new generator method thatcics.pycalls fails there; parse incics.pyinstead.textwrap.wrap(..., break_on_hyphens=False)or COBOL names split at hyphens.🤖 Generated with Claude Code