Repository navigation
#91 stage 4, H6: the number functions of the std runtime as machine calls with their refinement theorems, and every runtime item has its refinement statement (SP-29, RB-20, SP-30) - #304
Conversation
…nt for the number functions, RustStd with 17 more functions and theorems (unpruned definitions), the number text as methods of Str (statements and counts to finish)
…into claude/issue-91-stage4-heap-h6
…454) The row, its scenario, its section-31 row and CONFORMANCE line, and the named case conformance_sp_30, which fails on this head: the compiler table of runtime items holds formatInt (the decimal text of an integer, called as format_i64), and no theorem of RustRuntime or RustStd states it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecimalInt SP-29: the number functions are parse_int, format_int, and the format_ and parse_ function of each fixed width, one machine call each; formatDecimalInt is the calculus primitive formatDecimal at the integers. RB-20: families 26 to 43; format_int, which the handwritten runtime called as format_i64, is held to the digest the transcript records for format_i64 on the same values; a format_int that formats at another width is refused. The SPEC, CONFORMANCE and feature copies of both statements are the ids.toml text byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SP-29 lists refines_format_int; the RB-20 harness calls format_int on the values of format_i64 and holds it to the recorded format_i64 digest (HELD_AS); SP-23 expects 44 machine constructors and BS-05 one more machine crate. Red until the next commit adds the function, the primitive, and the theorem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… refinement theorem The runtime item FormatInt (the decimal text of an integer) had no function of its own: the generated code called format_i64 for it, and no theorem stated it. RustSyntax gains Machine.formatDecimalInt (family 43, one operand, no width), whose meaning RustSemantics states as the calculus primitive formatDecimal, the same as Item.formatInt; RustStd defines format_int as one call of it, printed as Str::format_i64 because the printed runtime holds the integers as i64, with the theorem refines_format_int; Item::FormatInt is called as format_int. The bootstrap twin of RustValidate names family 43 and the item row format_int. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…5 counts RB-20: a format_int that formats another value keeps its own label, which the golden transcript lacks (HELD_AS), and the statement says so. The unit test every_item_exists_with_its_failure_mode looks up the free function at the start of a line: the number text has the method Str::parse_int, which the lookup took for parse_int. BS-05: the four families 40 to 43 add one vector each to the validate and correspond counts and to the evaluator counts (464/213, 327/100, 438/301), as the ten of H4b added ten. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eorems; the index plant without overflow The shared term_cases list is pruned as H4b did: the 40 names H5 kept and the eighteen number-function definitions (58) prove every theorem but the eight format_<w> and parse_int; against format_i16 alone each of the 15 other names was dropped (allWidth and hasWidth are needed), and against parse_int alone (constructValue, evalArms and literal are needed); the 63 prove all 32. RB-20: the plant "an index that finds the next position" computed i + 1 at the harness index u64::MAX and panicked on the overflow without naming index_list, so the case failed on the accepted H5 head 45f2f07 as here; with wrapping_add the planted index returns the next item and the transcript names index_list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…SP-30, and the figures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…into claude/issue-91-stage4-heap-h6-merge
|
Maintainer review of H6 at Checked and found as stated: the R3 order ( The fix. The Order: #262 is in its sweep; #264, #265, #293, #297, #298 follow; #304 lands after #298 and retargets to Generated by Claude Code |
…machineArity (LLP2001 at 2239:1970); BS-05 states the figures of the head: 55 machine crates, 464 (213) validate and 327 (100) correspond runs
|
Defect and fix on this head, one commit (
Not run here: Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks for One commit on top,
🤖 Generated with Claude Code |
… 43 and the name format_int; figures 627/61, 2,083 (1,532), 562; BS-05 470/213, 333/100, 439+302 after the merge of heap-h5; VERIFICATION Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
… on heap-h6 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…mantics identity; locks, goldens, calculus, packages, fixtures and provenance regenerated Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
…but the Atlas, on the moved identity Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
The first pass's check-fixtures ran with an xtask the shared build directory had taken from another worktree (its repository root is fixed at compile time) and stopped when that worktree went away, so the fixtures whose identity moved kept their old records; the first gate refused vr-11, vr-15, cl-04 and cl-05 on their source ids. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
…een shard artifacts of the first gate run Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Stacked on H5 (#298,
claude/issue-91-stage4-heap-h5at45f2f07ef); draft. Contributor session continuing afflom's H6 WIP (befb1a0ee,fc276d224, merge1e32dc3c8) with new commits on the same branch; nothing of his is rewritten. It extendsSP-29andRB-20of #293/#297/#298 to the number functions and addsSP-30, so it merges only after #298 and retargets torelease/v0.4with it. Norelease/v0.4merge in this branch.What
RustStd(shipped byte for byte atlanguage/rust-runtime-1.2/RustStd.lex.tex) definesparse_int,format_int, and theformat_/parse_function of each of the eight widths. Each is one machine call:Machine.formatDecimal w(family 40),parseDecimal w(41),parseDecimalInt(42, optional;parse_intturnsNoneintoErr(Overflow)), andformatDecimalInt(43).RustSemanticsgives each an existing calculus primitive as its meaning:Prim.formatDecimal, andPrim.parseDecimalat the fixed type or atTy.int. Each has itsrefines_<function>theorem (runExport 12 stdCrate "<function>" args = runItem std Item.<item> args, byterm_cases, axioms[Classical.choice, Quot.sound, propext]). All 32 theorems of the module share one definitions list of 63 of the 73 names, pruned as H4b did.format_int.Item::FormatInt(the decimal text of an integer) had no function and no statement: the generated code calledformat_i64, andrefines_format_i64is overValue.i64, whichmachineAcceptsdoes not let aValue.intthrough.format_int(a: Int) -> Stris one call offormatDecimalInt, printedStr::format_i64(a);Item::FormatIntis called asformat_int. The golden transcript has noformat_intlabel.HELD_ASholds its digest to the recordedformat_i64digest on the same values, sotranscript.txtis unchanged.SP-30(new, register 454): every runtime item has its refinement statement.cases/rust_items.rsreads the 144 items ofruntime::Item::all()and the statements of therefines_theorems ofRustRuntimeandRustStd. It requires exactly one statement per item, at its profile, on the functionItem::pathgives it;equalandcompareare held bySP-25. This is the item-level acceptance plant "a runtime item with no refinement statement" of [v0.4] #27 stage 6: complete the closed Rust AST so the runtime is generated from the calculus #91.RB-21) and the removal ofSTD_BASEand the oracles, whose results are the transcript digests.Rows
R3 commits first:
113070614(SP-30: the row, its scenario, §31, CONFORMANCE, the case; red:every runtime item is held: "`formatInt` is a runtime item with no refinement statement"),accde1454(SP-29andRB-20statements nameformat_intandformatDecimalInt), and0f38e4ae5(the laws and the harness, red untila9415a7db).SP-29andRB-20are amended. The SPEC, CONFORMANCE and feature copies ofRB-20now equalids.tomlbyte for byte; the WIP had amended onlyids.toml.Shipped-crate changes (each with its plant)
ast.rs:Machine::FormatDecimalInt(family 43, arity 1, printedStr::format_i64(a)), next to the WIP'sFormatDecimal,ParseDecimal,ParseDecimalIntSP-23takes 44 constructors;RB-15;SP-29(a machine call of another primitive)runtime.rs:Item::FormatIntis called asformat_int; the unit test looks a free function up at the start of a line (it took the methodStr::parse_intforparse_int)SP-30(the item called asformat_i64is refused)data_b/syntax.rs:formatDecimalIntBS-05RENDERER_FILESthat move:ast.rs,runtime.rs. The bootstrap twin ofRustValidatelearns family 43 and the item rowformat_int.Measured (SP-22 protocol, posted on #91 before this draft)
lexlean verifyof the scratch project, two runs on a shared host: 33 s and 61 s, peak 706 to 719 MB with #91 stage 4, H5a: the types, impls, and helpers of the std runtime as source (RB-20, RB-19, BS-09) #298's modules; 30 s and 70 s, 703 to 745 MB with the arms; 91 s and 91 s, 1,631 to 1,649 MB withRustStd's 32 theorems pruned (unpruned 2,160 to 2,199 MB).conformance_sp_29258.5 s, peak lean 1,399,332 KiB.conformance_rb_2096.9 s.conformance_sp_23227 s.rb_15,rb_19,rb_21andsp_30pass.conformance_bs_05(it exceeds the 4.5 GB lanes here) and thebootstrapverify that sizesRustValidate's certificate againstmax_file_bytes(6,291,456). Both are left to CI on this draft. TheBS-05counts are raised by one per family: 55, 464/213, 327/100, 438/301.Found on #298's head
conformance_rb_20fails on45f2f07ef. The plant "an index that finds the next position" overflows at the harness indexu64::MAXand panics without namingindex_list.b736ca1ddwritesi.wrapping_add(1), after which the plant isthe transcript differs in: index_list.What fails here until the regeneration
The locks (
compiler,bootstrap;LLC0102), the recordsrust_renderer,rust_runtime_coreandrust_runtime_stdand the compiler-semantics ID (the_compiler_semantics_records_the_runtime,conformance_rb_07,rp_10), the generated packages and the production export (every package that formats an integer now callsformat_int),BS-05's committed-export assertion, and the goldens bound to the ID.transcript.txtdoes not change. Locks, goldens, packages and records are not committed.🤖 Generated with Claude Code