Skip to content

LE conditions: GnuCOBOL frame source, one identity per activation, handler cob_call_params 4 (Part of #8062) - #8748

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8062-20261120T0752Z
Nov 20, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8062-20261120T0752Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8062, slice 2 (after #8714): the GnuCOBOL frame source for the LE condition model. Everything stays assumed (IBM-documented), never proven (mainframe evidence policy rule 8). Still linked into no program, so no proof moves.

What

  • tests/equivalence/le_conditions/ggframes.c (new): libcob keeps one cob_module per program, the same address for every activation, so the address is no identity. The file interposes cob_module_global_enter / cob_module_leave (as faults/ggfault.c does for file I/O) and gives every activation a serial that is never reused. The frames the model sees are libcob's own chain, named by those serials.
  • Recursion is refused by name (exit 98, "a recursive activation is not modelled"): a program twice in the chain, whether libcob shares its module or not. A chain the activation stack disagrees on, or more than 4096 live activations, is refused the same way.
  • ceecond.c: a hook (gg_le_set_handler_hook) is called with 4 before each handler. ggframes.c stores cob_call_params = 4, because a handler is a COBOL entry reached by function pointer, not by CALL.
  • tests/cobol_mainframe/test_le_frames_8062.py (3 tests, ~1.5 s, skipped without docker and the oracle image), on GnuCOBOL 3.1.2:
    • a second CALL of a program the first returned from inherits no handler (CEE069), though both share one module address;
    • a handler runs in its own activation with NUMBER-OF-CALL-PARAMETERS 4, while the CEESGL CALL carried 3;
    • a RECURSIVE program that registers a handler is refused with exit 98.
  • docs/language_status/register/L8.md: the frame source is recorded and the remaining slices are trimmed.

Remaining slices

  1. Harness link line under its own evidence component (not tests/equivalence/le/, or every oracle:le record goes stale).
  2. Java twin cobolrt/le/Ceecond.java.
  3. det translator support (le-condition-handling in det/dyncall.py) plus SET ... TO ENTRY.
  4. CEEMRCE / CEE3SRP, CEENCOD / CEEMGET, promote / fix-up, nested conditions, ERRCOUNT.

Class / Sibling gaps

The class is the runtime facts the LE condition model needs from GnuCOBOL: which frames are live, a distinct identity per activation, and the handler's argument count. All three are handled here (frames and identity in ggframes.c, the argument count by the hook). Recursion is refused, not modelled: IBM's per-frame order across a recursion is not stated in what L8 cites. Sibling gaps outside this slice: the harness link line, the Java twin's frame source, and the det port's frames (all under Remaining slices). A handler that is not a COBOL entry (a C routine) needs no argument count and is covered by the existing 28-case C driver. No non-burned program was read.

Verification

  • test_le_frames_8062.py and test_le_condition_oracle_8062.py: 31 passed. test_zos_probes.py, test_source_reads.py: pass.
  • audit_check.py: all clear.
  • ruff format (pinned 0.17.1) on the new test: clean.

🤖 Generated with Claude Code

…cursion refused, handler call sets cob_call_params 4 (Part of #8062)

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 20, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 20, 2026 08:10
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 20, 2026 08:13
@squid-shepherd
squid-shepherd Bot merged commit b84c52d into main Nov 20, 2026
68 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8062-20261120T0752Z branch November 20, 2026 08:43
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant