Skip to content

det: a pointer or BLL cell compared with NULL / ZERO lowers onto the pointer lane (Part of #5197) - #5203

Merged
squid-protocol merged 5 commits into
mainfrom
churn/5197-20261015T1843Z
Oct 15, 2026
Merged

squid-protocol merged 5 commits into
mainfrom
churn/5197-20261015T1843Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5197 (box 1 only; box 2, the end-to-end SET(cell) proof, is not in this PR).

What

A pointer or an OS/VS COBOL BLL cell compared with NULL (a cell with ZERO too) was refused: det/expr.py refused NULL in any condition, and det/bll.py refused any cell mention outside its idioms ("used as a number").

  • expr.py: NULL / NULLS parses as one side of a relation (Fig("NULLPTR")); everywhere else it is still refused.
  • gen.py: pointer = NULL / NULL = pointer (and NOT =) is Cobol.compareFigurative(ptr, LOW_VALUES, CS) == 0 (X47: NULL is the all-zero handle). A pointer against anything but NULL or another pointer, and > < >= <= on a pointer, is refused by name; NULL against NULL, a subscripted / table / REDEFINES-overlaid pointer too.
  • bll.py: cell [NOT] = ZERO|ZEROS|ZEROES|NULL|NULLS (IS / EQUAL [TO], either operand order) lowers to cell [NOT] = NULL, IBM's conversion of the cell to a POINTER. A secondary cell and cell > ZERO stay refused.
  • Register X56 documents it (the Enterprise COBOL manual section is named, its page not checked). test_bll_cells_5119 pinned IF FRPTR = ZERO as refused: it now pins > ZERO.

Class table

Member Status
pointer vs NULL, = / NOT = / IS EQUAL TO, both orders this PR, tested
BLL base cell vs ZERO / ZEROS / ZEROES / NULL / NULLS, same spellings this PR, tested
pointer vs ZERO, > <, NULL vs NULL, table / REDEFINES / subscripted pointer, secondary cell refused by name, tested
pointer vs pointer, ADDRESS OF vs NULL, abbreviated OR NULL sibling gaps (still refused)

Tests / gates

  • tests/cobol_mainframe/test_pointer_null_cond_5197.py (46) plus the 5119 and 4771 suites pass. The GnuCOBOL equivalence proof (EQUIVALENCE_E2E) was NOT run; the oracle's lowered text is tested.
  • pr_gates --fast 6/6; --ratchets 8/8 (ports unchanged, no golden masters touched).

Cross-repo

None. Overlap: #5196 also touches bll.py, gen.py, X56.md and test_bll_cells_5119.py; expect it to merge first, then merge main here.

Lessons for agents

  • Cobol.compareFigurative(Field, LOW_VALUES, CS) already tests a pointer's NULL; no Java change needed.
  • A relation with NULL must skip cond_relations / self.relation() (the OSVS plan list goes out of step otherwise).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 15, 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 15, 2026 19:27
@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 19:30
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol

Copy link
Copy Markdown
Owner Author

PR #5203 @ e0f2675: 1 failed check(s)

== ground-truth part 1/2 (failure) -- real
https://github.com/squid-protocol/gitgalaxy/actions/runs/38794096237/job/116626577576
repro: python tests/tools/pr_gates.py --fast
failing tests: tests/cobol_mainframe/test_det_whole_programs_4270.py::test_other_uses_of_null_stay_refused[data1-IF
errors:
fail-on-cache-miss: false
E AssertionError: []
tests/cobol_mainframe/test_det_whole_programs_4270.py:96: AssertionError
FAILED tests/cobol_mainframe/test_det_whole_programs_4270.py::test_other_uses_of_null_stay_refused[data1-IF P = NULL DISPLAY 'N' END-IF-NULL: pointers are not modelled] - AssertionError: []
##[error]Process completed with exit code 1.
log tail:
13.65s call tests/cobol_mainframe/test_tool_regex_redos.py::test_catches_the_3205_pattern
13.05s call tests/cobol_mainframe/test_completeness.py::test_pinned_corpus_completeness[dbb-mortgage-application]
12.52s call tests/cobol_mainframe/test_refraction_differential.py::test_excerpt_no_new_unexplained[aws-mainframe-modernization-carddemo]
11.34s setup tests/cobol_mainframe/test_port_tickets.py::test_every_program_with_business_logic_gets_a_ticket
10.11s call tests/cobol_mainframe/test_refraction_differential.py::test_excerpt_no_new_unexplained[cics-banking-sample-application-cbsa]
10.03s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE P0 TO UW MULTIPLY 100000 BY UW-9876500000 into a 9-digit binary item-False]
9.86s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[item-BIN]
9.68s call tests/cobol_mainframe/test_trunc_opt.py::test_conforming_values_give_trunc_stds_results[True]
9.46s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[item-STD]
9.32s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[literal-STD]
9.12s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE P0 TO UW MULTIPLY 100000 BY UW-9876500000 into a 9-digit binary item-True]
8.99s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 9999 TO SH MOVE SH TO NS ADD 1 TO NS MOVE NS TO SH-10000 into a signed 4-digit binary item-True]
8.98s call tests/cobol_mainframe/test_java_subprocess_utf8.py::test_no_maven_subprocess_in_tests_decodes_with_locale_charset
8.92s call tests/cobol_mainframe/test_lifted_binary_trunc.py::test_typed_binary_stores_equal_bytes_and_the_oracle[literal-BIN]
8.87s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 99999 TO SH-99999 into a signed 4-digit binary item-True]
8.83s setup tests/cobol_mainframe/test_port_invariance.py::test_contract_holds_on_the_committed_pairs
8.75s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 9999 TO SH MOVE SH TO NS ADD 1 TO NS MOVE NS TO SH-10000 into a signed 4-digit binary item-False]
8.69s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[COMPUTE SH = P0-98765 into a signed 4-digit binary item-False]
8.62s call tests/cobol_mainframe/test_trunc_opt.py::test_a_value_past_the_picture_stops_by_name[MOVE 99999 TO SH-99999 into a signed 4-digit binary item-False]
=========================== short test summary info ============================
FAILED tests/cobol_mainframe/test_det_whole_programs_4270.py::test_other_uses_of_null_stay_refused[data1-IF P = NULL DISPLAY 'N' END-IF-NULL: pointers are not modelled] - AssertionError: []
assert ([])
1 failed, 3846 passed, 555 skipped, 1 warning in 394.32s (0:06:34)
##[error]Process completed with exit code 1.
Post job cleanup.
[command]/usr/bin/git version
git version 2.55.0
Temporarily overriding HOME='/home/runner/work/_temp/725f2221-dded-4943-9e4b-7f41847e8d8e' before making global git config changes
Adding repository directory to the temporary git global config as a safe directory
[command]/usr/bin/git config --global --add safe.directory /home/runner/work/gitgalaxy/gitgalaxy/gitgalaxy
Removing SSH command configuration
[command]/usr/bin/git config --local --name-only --get-regexp core.sshCommand
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'core.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
Removing HTTP extra header
[command]/usr/bin/git config --local --name-only --get-regexp http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http.https://github.com/.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
Removing includeIf entries pointing to credentials config files
[command]/usr/bin/git config --local --name-only --get-regexp ^includeIf.gitdir:
[command]/usr/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Cleaning up orphan processes

@squid-protocol squid-protocol added the shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md label Oct 15, 2026
…(Part of #5197)

#5197 translates a pointer = / NOT = NULL, as IBM Enterprise COBOL's pointer relation condition allows
(covered by test_pointer_null_cond_5197.py). The stale case expected it refused; the still-unmodelled
relation (IF P > NULL: only = and NOT =) takes its place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md shepherd:needs-fix Bot: a real failure on this head; see the digest comment. Guide: docs/ci.md labels Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

1 similar comment
@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