Skip to content

HFP: IEEE conversion in the det runtime, held bit for bit to the model (Part of #4271) - #5720

Merged
squid-protocol merged 3 commits into
mainfrom
churn/4271-20261020T0943Z
Oct 20, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
churn/4271-20261020T0943Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #4271. Checklist: partial [c:ff93cc35] -- the proof against captured z/OS outputs (#4050; no zos-run capture exists, capturing is out of scope).

What

det/hfp.py already modelled IEEE binary32/64 <-> HFP (#5708, #5713). The det runtime had no mirror. This adds Hfp.ieeeValue, fromIeee, toIeee to cobolrt/Hfp.java (binary64 exact in long HFP; binary32 truncated to long then rounded to short, ASSUMED; HFP to IEEE nearest, ties to even; NaN / infinity / subnormal / out of range refused by name), with store factored through a shared image().

test_det_hfp.py's bit-for-bit Probe now also compares the runtime with the model over IBM's examples, 0.1, both range edges, the refusals and 80 random patterns, plus 17 HFP images to IEEE. Rule RT-HFP-IEEE-CONVERSION (ASSUMED) added to cobolrt_rules.json; C6.md updated.

Evidence

  • test_det_hfp / test_hfp_ieee / test_hfp_zos_captures / test_cobolrt_rules: 199 passed; cobolrt_rules.py --check consistent; audit_check.py clear; pr_gates --fast 6/6.
  • det_port.py check moved 18 ports (Hfp.java text only); re-proved: 17 PROVED. mortgage-mpmt stays JAVA FAILED / KNOWN_UNPROVEN for its two documented holes (float **, FUNCTION ANNUITY), unchanged.
  • No golden/ledger change (no parsing code touched).

Sibling gaps

  • Float ** and FUNCTION ANNUITY refused (EPSMPMT, DBB MortgageApplication): wait on z/OS captures (Captured mainframe outputs as the equivalence oracle (beside GnuCOBOL) #4050).
  • No COBOL statement reaches the IEEE conversion; it is model-level only.
  • Stale Hfp.java copies under tests/cics_crucible/ports/{pc-return-immediate/PCIMMA,pc-wizard/PCCONF}/overlay already differ from source; untouched.

Lessons for agents

  • Adding a method to a catalogued runtime family needs a rule entry (or plumbing) in cobolrt_rules.json, and any cobolrt edit moves every port carrying that class (18 here): run det_port.py check then re-prove the listed ports.

🤖 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 20, 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 20, 2026 10:06
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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