Skip to content

equivalence: the oracle's PSA/TCB/TIOT -- ggtiot.c and the equivalence_mvs lowering (Part of #5856) - #5887

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5856-20261021T1607Z
Oct 21, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5856-20261021T1607Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5856 (slice 2 of 3: the oracle side of register A2). Slice 1 was #5868.

What

GnuCOBOL has no PSA at address 0, and a 4-byte BINARY cannot overlay its 8-byte POINTER, so CardDemo CBSTM03A's PSA -> TCB -> TIOT walk could not run on the oracle. This lays the same three blocks on the oracle side from the same stated step.

  • tests/equivalence/le/ggtiot.c (new, auto-linked): lays PSA / TCB / TIOT from env GGMVS_STEP, same grammar and refusals as DetMvs.build. Entry points GGPSAPTR, GGMVSCHK, GGTIOTADV, GGTIOTSUB. A refusal is GGTIOT: ... is not modelled, exit 98.
  • tests/tools/equivalence_mvs.py (new): lower(program, step) rewrites the idiom (plain POINTER never written -> PSA; each SET ADDRESS OF rec TO ptr checked against the block; ptr REDEFINES view POINTER -> standalone POINTER; COMPUTE v = v +/- n, ADD, SUBTRACT -> advance / retreat calls). Every other use of the numeric view, and a missing step, is a named refusal.
  • tests/tools/equivalence.py (+6 lines): calls lower, passes GGMVS_STEP from the case's mvs_step.
  • docs/language_status/register/A2.md: Oracle paragraph now modelled, with the limit below.
  • tests/cobol_mainframe/test_mvs_oracle_5856.py (new, 21 tests).

Class table

Input class Result
23 stated steps (zero / one / many DDs, UCB / NOUCB, name 8 and 9 long, malformed, missing fields, empty, trailing comma, 40 DDs) C blocks equal DetMvs.build byte for byte, or both refuse
COMPUTE v = v +/- n, ADD n TO v, SUBTRACT n FROM v, n signed or LENGTH OF lowered to calls
*, n + v, ROUNDED, SIZE ERROR, GIVING, MOVE, IF, DISPLAY, a second REDEFINES refused by name
no step / quote / newline in step refused
program without the idiom returned unchanged
lowered CBSTM03A-shaped walk (TIOTW) on GnuCOBOL (docker) stdout equals the det port's; 3 refused walks exit 98

Limit: GGMVSCHK lets a pointer into no laid block through (the C side cannot tell it from another lane's pointer); the det side refuses it.

Left (slice 3)

CBSTM03A equivalence case with mvs_step, the Java -Dgitgalaxy.mvs.step side in the harness, evidence.py prove.

Gates

audit_check, pr_gates --fast 7/7, ruff format (0.17.0) clean; the new tests plus test_tiot_walk_5856, test_det_ceedays, test_source_reads pass. No engine change, so no golden bless.

Cross-repo

None. Overlaps open PRs #5842 / #5873 only near equivalence_cics.py / equivalence_ims.py; this touches equivalence.py by 6 lines.

🤖 Generated with Claude Code

…e_mvs lowering (Part of #5856)

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 Oct 21, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 21, 2026 16:23
@squid-protocol
squid-protocol enabled auto-merge (squash) October 21, 2026 16:34
@squid-protocol
squid-protocol merged commit 0a19906 into main Oct 21, 2026
57 checks passed
@squid-protocol
squid-protocol deleted the churn/5856-20261021T1607Z branch October 21, 2026 17:18
@squid-protocol

Copy link
Copy Markdown
Owner Author

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