Skip to content

equivalence oracle: a pointer numeric view's zero test lowers to the NULL test (Part of #7434) - #7600

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7434-20261103T1355Z
Nov 3, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/7434-20261103T1355Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #7434 (tool slice).

What

equivalence_cics_pointer.lower now accepts the NULL test of a POINTER's numeric view, the one idiom the det port already translates (view_zero_relation, X47). view [IS] [NOT] = | EQUAL [TO] 0 | +0 | 0.0 | ZERO | ZEROS | ZEROES (zero on either side, a leading NOT) becomes ptr [NOT] = NULL. The view's bytes are never read as a number. No case data.

Class

A numeric view (REDEFINES a POINTER, PIC S9(n) COMP) tested against zero, in every spelling the det port accepts. Tests cover the whole input class: =, NOT =, EQUAL, IS NOT EQUAL TO, ZERO/ZEROS/ZEROES, +0, 0.0, zero left of the view, NOT view = 0, AND/OR with several views, a sentence-ending period beside an ADD on a later line.

Sibling gaps (still refused by name, as in the det port)

  • ordering tests of a view (>, <)
  • a view compared with a non-zero number (= 5, = 0.5), SPACES, another view or an item
  • a condition split over several lines (lower works per line)
  • arithmetic forms already refused (COMPUTE, MOVE number to view, ADD GIVING)

Checklist

Checklist: partial [c:3a093f88] -- the oracle can now lower the CAGMZ-style IF view = 0; the per-case scenarios and re-run are not in this tool slice.

Evidence

pytest tests/cobol_mainframe/test_cics_pointer_lowering_6839.py test_pointer_lane_4771.py: 112 passed (system python3, no translator extra, so det tests may skip; no JDK run). cobc is not installed here, so ptr NOT = NULL was not compiled by GnuCOBOL; it is standard GnuCOBOL syntax. pr_gates --fast was not run: no venv with the worker extras was found on this box ($PRIMARY/../venvs is absent); the pinned ruff 0.17.2 format is clean on both files.

Cross-repo

None.

Lessons for agents

  • IF NOT view = 0 lowers to NOT ptr = NULL, which is correct COBOL; it needs no refusal.
  • $PRIMARY/../venvs was absent in this worktree; python3 -m pytest worked for these tests.

…ointer's NULL test (Part of #7434)

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 3, 2026
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 3, 2026 13:59
@squid-shepherd

squid-shepherd Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 3, 2026 13:59
@squid-shepherd
squid-shepherd Bot merged commit 7fa358b into main Nov 3, 2026
86 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/7434-20261103T1355Z branch November 3, 2026 14:30
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