Repository navigation
t27b: a narrow signed @mod widens to the i64 routine -- arena_heap and file_io_contract pass (Closes #10423) - #10431
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t pass (Closes #10423) gen/rust/tri/t27b/libm_plan.rs regenerated with t27c gen-rust on the Railway lab. Seals for libm_plan and conformance/rem_int re-saved. The ledger moves specs/ml/arena_heap.t27 and specs/ml/file_io_contract.t27 to pass, so max_not_pass goes from 77 to 75. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 18, 2026
Contributor
This was referenced Oct 18, 2026
Open
gHashTag
enabled auto-merge (squash)
October 18, 2026 12:04
This was referenced Oct 18, 2026
gHashTag
added a commit
that referenced
this pull request
Oct 18, 2026
…ng it (Refs #10431) (#10453) cc598ec (#10431) added `ri_is_pow2` to specs/tri/t27b/conformance/rem_int.t27 as a byte-for-byte copy of specs/ml/arena_heap.t27's `is_pow2`. That is a new duplicate body no ledger holds, so the Duplicate Body Ratchet has been red on master since 89254d2. rem_int now says `use ml::arena_heap;` and asserts on `is_pow2` itself, the way libm_logf.t27 uses tri::t27b::libm. The 7 asserts are unchanged; the ledger is not touched (the corpus goes 686 -> 684 bodies, 197 -> 196 groups). Seal of rem_int re-saved through `t27c seal --save` (its closure now holds arena_heap). On the Railway lab: dupe_scan ok, `t27c check` ok, `t27c test-report` 8/8 pass (12 runtime asserts in the corpus test), and `t27b build --elf` accepts the file. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10423
Follow-up to #10405 / #10410 (t27b coverage epic #6063).
What
Before this PR, a signed
@modlowered only fori64. A narrower signed@modwas refused withExprCall(@mod)(REFUSE_WIDTH). Now it widens:__t27b_libm_mod.0 <= r < bandbfits the operand type.Choice, recorded in
specs/tri/t27b/libm_plan.t27: widen and narrow, not onemodroutine per width. The per-width approach would need a routine for each of i8, i16, i32 and every odd width. Widening needs one routine and one rule (CALL_WIDE,widens()).A signed
@modwider than i64 (the new kindK_WIDE, e.g.i65,i128) stays refused with REFUSE_WIDTH, since there is no i128 routine. An integer@remof any width stays t27b's%.Files
specs/tri/t27b/libm_plan.t27:K_WIDE,CALL_WIDE,widens(), and a new testa_narrow_signed_mod_widens_to_the_i64_routine. The kind test now coversi63/i64/i65/i128/u128/f128.gen/rust/tri/t27b/libm_plan.rs: regenerated witht27c gen-rust.cli/t27b/src/lower.rs: thelibm_callglue wraps the arguments inWidenand the call inCastwhenxp::widens(a). Net change is -1 line (6+/7-).specs/tri/t27b/conformance/rem_int.t27: adds i32/i16/i8/i7@modextremes and a sweep against the i64 one. It also adds the corpus's own i32 mods as written:millisfrom reel_particles_mux andis_pow2from arena_heap. No new file.libm_planandconformance/rem_int.docs/reports/t27b_expectations.json:specs/ml/arena_heap.t27andspecs/ml/file_io_contract.t27move topass, andmax_not_passgoes from 77 to 75.Evidence (Railway lab, t27b aarch64 under qemu, t27c release)
t27b test --checkt27c test-reportt27b test --blockersno longer listsExprCall(@mod)for arena_heap, file_io_contract orspecs/t27f/reel_particles_mux.t27. reel_particles_mux is still blocked, now only byExprCall(std.*)(6std.debug.printsites). That is outside this issue, and the spec has no ledger row.No timing here is a speed result (qemu).
🤖 Generated with Claude Code