Skip to content

Add HLASM / IBM Z Assembly (hlasm), resolving the .asm collision with assembly (#2503) - #3095

Merged
squid-protocol merged 4 commits into
mainfrom
lang/hlasm-2503
Sep 16, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
lang/hlasm-2503

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #2503 (parent #2516).

A new hlasm profile (.asm/.hlasm/.mac; positional_anchored through prism's bms mode — bms is HLASM macro source, so #2505's mode gate widens to lang_id in ("bms", "hlasm") at both call sites) wiring 44 of 54 rule keys and covering #2503's x/y/z asks: func_start CSECT/RSECT/START, ipc_rpc_bridges DFHEIENT/DFHEIRET + the CICS/SQL/DLI bridge vocabulary (cobol/pli's #2990 sharing, verbatim), and macros MACRO/MEND + the conditional-assembly family.

The .asm conflict is resolved as the issue asked, via discriminators plus the #2511 mechanisms:

  • .asm joins COLLISION_FREQUENCIES so Tier 1 never locks it on extension alone.
  • hlasm declares mainframe-sibling discriminators (.mac/.jcl/.cbl/.cob/.cpy/.pli/.pl1/.bms) for Tier 1.5 ecosystem gravity, x86-artifact disqualifiers (.nasm/.masm/.s/.S/.ld/CMakeLists.txt), and an internal_discriminator (CSECT/DSECT/RSECT/AMODE/RMODE/USING/LTORG/MEND/DFHEIENT/DFHEIRET in operation-field position) for Tier 2 content locks. Verified end-to-end through the real LanguageDetector: HLASM content in .asm locks hlasm; NASM content in .asm stays assembly.

Deliberate deviation from the issue text, contract-cited and pinned by a test (the #2511 documented-deviation shape): DSECT is class_start, not func_start — a dummy section is a named storage layout that assembles no executable logic, #2856's record/struct family, reached by USING name,reg. Also deliberate: no invocation_model: positional, diverging from bms/jcl — L 15,=V(name) + BALR, the CALL macro and USING reach hlasm's extracted units by name, so the #2866 census applies (and hlasm joins the _visibility_export_list pinned family: ENTRY A,B names many entries at once, #2823's list form).

Wiring beyond the definition:

tests/extraction/languages/test_hlasm_strict.py (the issue's named deliverable): 145 cases — per-rule positive/negative coverage, schema completeness, collision routing through the real detector, prism family checks, Mode A extraction, operation-field boundary audits (WAIT=YES on a continuation line, remarks after operands), and a 35-payload ReDoS detonation sweep whose payloads include the issue's "long macros" case (an unclosed 32k-char MACRO prototype). The adversarial pass caught two real defects pre-merge, both fixed: dead_code fired on * DC POWER SUPPLY NOTES banner prose, and _visibility_export_list could capture a blanks-only region.

Golden masters regenerated in both environments. All 148 fixture line changes per env are Artifact Identity metadata (Lock Tier / Identity Proof) on the crucible's 74 x86/ARM .asm files, whose extension locks became Ecosystem Consensus locks (80–100% local dominance) now that .asm is contested — the #3090 .sql shape verbatim. Verified via golden_diff.deep_compare: 0 off-target files, 0 language flips, 0 signal-count changes. The corpus carries no z/Architecture sources, so hlasm's own positive case is covered by the keyword-rosetta shell instead.

Real-scan proof (the #2806 class): galaxyscope CLI on a fresh HLASM tree → file_data reads language=hlasm, function_count=4, struct_branch=3, arch_io=3 — matching the control-shell manifest exactly.

The keyword-rosetta data/hlasm/ control folder ships as a companion PR (corpus/hlasm2503, 98 gate assertions PASS); merge this PR first, then the corpus one (the db2_sql order). The fidelity_table.py FIDELITY_PROVENANCE re-pin remains owed post-merge (the audit's standing warning, accumulated since #2511).

🤖 Generated with Claude Code

squid-protocol and others added 4 commits September 16, 2026 11:59
… assembly (#2503)

A new hlasm profile (.asm/.hlasm/.mac; positional_anchored via prism's bms
mode -- bms IS HLASM macro source) wiring the full baseline, covering #2503's
x/y/z asks: func_start CSECT/RSECT/START, ipc_rpc_bridges DFHEIENT/DFHEIRET +
the CICS/SQL/DLI bridge vocabulary, macros MACRO/MEND + conditional assembly.

Deliberate deviation from the issue text, #2856-cited: DSECT is class_start,
not func_start -- a dummy section is a named storage LAYOUT (the contract's
struct/record family) that assembles no executable logic.

The .asm conflict is resolved as the issue asked: .asm joins
COLLISION_FREQUENCIES so Tier 1 never locks it on extension alone; hlasm
declares mainframe-sibling discriminators (.mac/.jcl/.cbl/.cob/.cpy/.pli/
.pl1/.bms), x86-artifact disqualifiers, and a CSECT/DSECT/USING/AMODE/MEND/
DFHEIENT internal_discriminator for Tier 2 content locks.

Wiring beyond the definition: prism.py bms-mode gate widened to hlasm (both
call sites), detector.py Mode A routing + named class_start extraction,
analysis_lens.py strictness row (all-False) + systems ecosystem,
_lens_config.py collision entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…macros (#2503)

The pass caught two real defects, both fixed: dead_code fired on '* DC
POWER SUPPLY NOTES' banner prose (operand shapes now guard the USING/DC/
DS/EQU arms), and _visibility_export_list could capture a blanks-only
region (the capture now opens on a name character).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
All 148 fixture line changes per env are Artifact Identity metadata (Lock
Tier / Identity Proof) on the crucible's 74 x86/ARM .asm files, whose
extension locks became Ecosystem Consensus locks (80-100% dominance) now
that .asm is contested -- the #3090 .sql shape verbatim. Verified via
golden_diff.deep_compare: 0 off-target files, 0 language flips, 0
signal-count changes; every file still resolves to assembly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…2503)

The #2823 tripwire fired as designed: ENTRY publishes a comma-joined list
of additional entry points, so hlasm is the fifth export-a-list language.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 9d97cb2 into main Sep 16, 2026
32 checks passed
@squid-protocol
squid-protocol deleted the lang/hlasm-2503 branch September 16, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Language Addition: HLASM / IBM Z Assembly (hlasm)

1 participant