Repository navigation
det: CALL identifier over the names the source fixes; DSNTIAC refused by name (Part of #4736) - #4750
Merged
Merged
Conversation
… by name (Part of #4736) A CALL whose program is a data item is dispatched over the names the item can hold (a VALUE, a VALUE table through a REDEFINES, MOVEs of literals), and refused by name when a reaching value is not statically known. The engine's dynamic_call_targets now follows a MOVE from an element of a VALUE table, so EPSMPMT gets its handleCall. DSNTIAC / DSNTIAR are refused by name (Q5). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
…4736) Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
| def targets(gen, s: S.Stmt) -> list[str]: | ||
| """`values`, each checked to be a program the port can call: an unknown value, a name no estate service or | ||
| library routine answers to, or one the port does not match (blank, mixed case, over 8 characters) is refused by name.""" | ||
| from gitgalaxy.tools.cobol_to_java.det.gen import LIBRARY, Untranslatable |
| out += [f"{ind} case {jstr(n)}: {{", *one(n, ind + " "), f"{ind} break;", f"{ind} }}"] | ||
| why = f"CALL {s.data['dynamic'].name}: the program name is none of {', '.join(names)}" | ||
| out += [f"{ind} default: throw new Hole({jstr(why)});", f"{ind}}}"] | ||
| return out |
Contributor
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 #4736 (and #4270). DBB MortgageApplication
epscsmrtnow translates whole; COTRTLIC'sCALL DSNTIACis refused by name, so it stays one statement short.Dynamic
CALL identifierdet/dyncall.py,Gen.dynamic_call): the names the identifier can hold when the CALL runs are found from the source. (1) A MOVE of a literal, or of an item whose bytes VALUE clauses fix and nothing writes (through a REDEFINES table, literal subscripts: epscsmrt'sMOVE CALLED-PROGRAM-NAME(1) TO WS-CALLED-PROGRAM), earlier in the CALL's paragraph on its own path with nothing between that may write the item; else (2) an item with a VALUE whose every write in the program is such a MOVE (its VALUE and each MOVEd value). One name is one call; several are a switch on the content (trailing blanks trimmed), a case per name.galaxy_ir.dynamic_call_targets): a MOVE from an element of a VALUE table names the table's programs, so EPSMPMT's service gets itshandleCall(mortgage program calls 18/19 -> 19/19, PINNED updated).DSNTIAC / DSNTIAR
Refused by name ("DSNTIAC: Db2's message text is not modelled"), whether written
CALL 'DSNTIAC'or through an item (COTRTLIC'sCALL LIT-DSNTIAC). Db2's message catalogue is not documented byte for byte and the oracle (ggsql.c / Db2 for Linux) cannot produce z/OS's text. Register Q5 stays REFUSED, reworded.Census (
cics_census.py blockers --all-programs, baseline 5abdf0c vs this branch)dynamic CALL(2 only-gap, 6 touched) is gone; it becameDSNTIAC: Db2's message text is not modelled(COTRTLIC, 1 only-gap) and three<name>: no program of that name with a CALL entry in the estate/ZUIDSTCKrows in programs that have other gaps.Evidence
tests/cobol_mainframe/test_det_dynamic_call_4736.py: 5 shapes (VALUE only, MOVE literal, VALUE table via REDEFINES as epscsmrt, two values -> switch, trailing blanks) run under GnuCOBOL (callees ascobc -mmodules) and as the port, DISPLAY output equal (EQUIVALENCE_E2E=1); 12 refusals asserted by name.det_port.py checkvs origin/main: 77/79 ports unchanged; changed: mortgage-mpmt (gainshandleCall, still KNOWN_UNPROVEN: COMP-1, C6) and carddemo-cotrtlic.proof_sweep.py --det-only --cases mortgage-mpmt,carddemo-cotrtlic(Db2 local): carddemo-cotrtlic PROVED on 27 scenarios (56/59 paragraphs, 165/230 branches), mortgage-mpmt NOT PROVEN, "sweep: as expected".pr_gates.py --fast5/5;--ratchetsall pass after the completeness pin (golden masters not run locally; CI does).🤖 Generated with Claude Code
https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D