Repository navigation
#91 stage 4, H3b: the abstraction theorems of the list representation, kernel-checked (SP-27) - #264
Conversation
…, scenario, and the failing named test
…-checked: RustLists, its case, five planted defects
|
Maintainer review of b8b46a1 (read-only; Round
Nits (same push)
Observations for H4, no action here: no I will re-verify the round by reading the diff. Generated by Claude Code |
…ry' into claude/issue-91-stage4-heap-lists # Conflicts: # CONFORMANCE.md # SPEC.md
…ons, growth, fresh at the store length, aloneOn wired, frames; case, register, SPEC
…ry' into claude/issue-91-stage4-heap-lists # Conflicts: # CONFORMANCE.md # SPEC.md # features/suites/preservation.feature
|
Maintainer: re-verification of the round at 6574d14 (read-only;
Carry in the same push: the single valid-state theorem I asked for separately (the in-place cons for a buffer with room, encoded as Generated by Claude Code |
…room, closed by the lemmas as rewrite rules; put_run_abs
…ry' into claude/issue-91-stage4-heap-lists # Conflicts: # CONFORMANCE.md # SPEC.md
…uncate, the holds converse, the allocation of capacity sixteen, uncons as the noun; #262's window_count merged
|
Maintainer: e5383bb is accepted (read-only re-verification; Two wording corrections to ride the next push on this branch (no theorem, gate or plant changes): the in-place clause says Lands after #254, #255, #259 and #262 with its own regeneration. Generated by Claude Code |
…he section column is §17.17; the first plant refuses cons_in_place too
…landing; register 452 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
…e, as clippy's type_complexity lint requires Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013QppGKetUURseXowZun9KY
Stacked on #262 (
claude/issue-91-stage4-heap-memoryatc353d2536, merged in); draft. Second of the two memory PRs of the heap half (H3b).What
RustLists(compiler/src/RustLists.lex.tex, language 1.2, onRustMemory's buffers and the calculus's values) models the runtime'sList<T>(Repr::{Nil, Run{buffer: Rc<Vec>, len}, Cell(Rc<Node>)}) as a handle: the items of the cells in front (spine) and a terminal, the empty list or a run, the firstmore+1slots of the buffer at an address of a store, a chain ofRustMemory::Buf. A handle reads back as the calculus's list (absHandle). Reference counting is derived, not stored:holdsis the sameness of the terminal's address and the buffer's,aloneOn(no other handle holds it) is the answer ofRc::get_mut, andconsWorldconsults it. 53 theorems, all[propext]except the reflexivities, no definition observing an axiom.cons_in_place: for the first buffer of a store with room after the run and any length at least the run's, with no other handle, the cons throughconsWorldreads as the item before the old list. It is closed by simplifying withmin_keeps_run,room_before_slotandput_run_absas rewrite rules. The pieces it is built from are stated apart:consIntruncates the buffer to the run (bufTruncate) and pushes withRustMemory.bufPush, keeping the buffer when the push is refused; the room guard isF = lessThan m (size slots),m = minNat n len;walk_cons(the read back is a pick byF),push_run_abs,full_is_capacity(a refusal isFfailing; the outcome isFull),min_keeps_runandtruncate_keeps_run(onbufTruncate: its length is the run when the buffer is at least as long),inplace_viewandcons_view(the handle, with the in-place write chosen byaloneOn).allocation).growBufappends slots:grow_run_abs/append_run_abs(the slots read as they did),room_after_growth/grown_has_room(the grown buffer has room).alloc_capacity,alloc_length) atstoreLenand no other address (walk_alloc,cons_alloc_view,cons_alloc_store), and the buffers before it are read as they were (alloc_frame).cons_cell_view/cons_cell_store,cons_shared_view/cons_shared_store, andcons_held_storeonconsWorldfor a holder among the other handles (store after = store before).run_uncons_abs,run_last_abs,walk_uncons,walk_uncons_last,uncons_cell_*,uncons_run_*,uncons_last_*.cons_frame,inplace_frame(phrased withholds).same_with_itself,holder_on_own_buffer,holder_without_run; a handle on another address holds nothing (apart_above,apart_below,holds_apart_above,holds_apart_below);own_blocks,holder_blocks(a holder blocks the write),others_allow_above/below,holder_elsewhere_above/below.release_ends,release_one_short,release_needs_fuel(releaseLoop n (unshared (n+1))isspent),release_one_cell.Dropped from the first draft: the literal step tables and their two theorems,
gapOf/gapPick/same_is_no_gap(sameNatis the single address test),takeN/snoc, the freefreshanduniqueparameters.The claim is the model's, and the register says so: that
Rc/Vec/Listbehave as the model, that the derived count is theRc's, and that theDroploop is the release loop are the differential's and rustc's evidence (H4's), never these theorems.SP-27 (
build)cargo test -p repo-conformance --test conformance -- conformance_sp_27, 4-core 15 GB container, pinned Lean 4.32.1: 83.9 s wall (module + ten planted modules). Each plant is asserted by the theorems Lean refuses and the diagnostic: wrong slot (walk_cons,cons_in_place), wrong uncons slot (walk_uncons,walk_uncons_last), shared run written in place (cons_view,cons_held_store), a write reaching the next buffer (cons_frame), a release counted one short (release_ends), growth dropping the slots (grow_run_abs,grown_has_room), a fresh buffer not atstoreLen(cons_alloc_view), a fresh buffer a slot short of sixteen (alloc_capacity), an inverted refusal (full_is_capacity,cons_in_place), a holder that does not block (own_blocks); plus the listing refusals.Identity
New module in the compiler project.
compiler/srcis not in the embedded set the compiler-semantics ID hashes andcompiler/expectedcovers onlyMain's closure, so no ID moves, no record regenerates, and no relock is owed. Register 449,SP-27in §31 and the totals.🤖 Generated with Claude Code
https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG