Repository navigation
HLASM slice 4: independent POPS interpreter cross-checks the lowering (Part of #5859) - #6934
Conversation
… (Part of #5859) tests/tools/hlasm_interp.py interprets the lowering's subset from the Principles of Operation alone (EBCDIC storage, 32-bit registers, real condition code, EXEC CICS as events). The test compares CH branch conditions of the lowering with it, pins the instruction semantics the Base64 decoder uses, and checks ZECS002's end COMMAREA and event sequence for all 11 scenarios against the GnuCOBOL run of the lowering. One difference surfaced: CA_RC is ASCII text in the lowering, EBCDIC on z/OS. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
|
No description provided. |
|
No description provided. |
|
No description provided. |
|
PR #6934 @ e689ddf: 1 failed check(s) == shepherd (label event) (failure) -- real |
What
Slice 4 of the assembler path (#5859): an independent interpreter for the HLASM subset, used to cross-check
det/hlasm.py. The oracle proves the det port of the lowered COBOL, not the lowering (design-doc assumption 1); this adds a check of the lowering that has no COBOL in it.tests/tools/hlasm_interp.py(new): written from the Principles of Operation only, imports nothing fromdet/(so the translator fingerprint does not move). EBCDIC cp037 storage, 32-bit registers, real condition code, EXEC CICS as recorded events.tests/cobol_mainframe/test_hlasm_interp_5859.py(new, 70 tests, 0.1 s): everyCHmask of the lowering's branch condition vs the interpreter over boundary pairs (masks 1 and 14 are refused by name);CLI/CLC/OC/XC/SRcondition codes; theIC/SLL/SLDL/STCM/BASsemantics the Base64 decoder leans on;MVCoverlap; ZECS002's end COMMAREA and CICS event sequence for all 11zecs-zecs002scenarios against the GnuCOBOL run of the lowering (pinned from adet_port.py run, 511/511 PROVED).docs/language_status/hlasm_cics_design.md: Status / Remaining refreshed (cases exist, slice 4 partial).tests/tools/ladder_exclusions.py: the ZECS002 reason said "no equivalence case yet"; it has one. Text only; the entry and its kind are unchanged.Finding
The lowering stores
MVC CA_RC,=C'00'as ASCII text (3030); z/OS stores EBCDICF0F0. Same characters, other encoding: the known cost of assumption 3. The test normalises that two-byte field and nothing else; every other COMMAREA byte is identical in all 11 scenarios.Class and siblings
Class: the lowering's fidelity to POPS rests on regex unit tests only. Fixed here: the branch-condition and ZECS002 end-state mechanism. Sibling gaps: ZECSNC's 7 scenarios are not run through the interpreter (needs
zecs-zecsnc); a per-instruction differential undercobc(Docker-only on this box); an X register entry for ZECSNC assumption 1. Non-burned estates are out of scope.Remaining slices
cobc. 2. ZECSNC scenarios through the interpreter.Checklist: partial [c:e14a97c1] -- the cobc differential and ZECSNC scenarios through the interpreter are left
Gates
New + lowering + exclusions tests 150 passed;
pr_gates --fast9/9; time ratchet PASS;audit_check.pyall clear. No engine code changed, so no golden bless.Lessons for agents
The
zecs-zecs002case's encoded field is EBCDIC base64 at COMMAREA offset 20, not ASCII at 12.🤖 Generated with Claude Code