Repository navigation
P2 (AArch64): the fl4-sync gate and locks refine the gate model, with the CDT and IPC-buffer history (DESIGN §9 item 4) - #149
Merged
Conversation
… the CDT and IPC-buffer history (DESIGN §9 item 4) DESIGN §9 item 4, both halves, for AArch64. One commit on `main` @ `c98a08b1c` (after losfair#146 and losfair#147): 34 files, +9216 / −199. No Rust changes (nothing under `crates/`). No x86 statement changes. **Half 1 (the history along an execution).** A replay record `InvR` beside `InvH`; P1's MDB tree facts hold of the replayed history (`MdbSH`) along every execution of the local-path family, every slot's edit being one of P1's (`SlotWireP`). The top family is `fl4LocPBL` (`DelLkA`): the Delete-with-PTE start needs the CDT facts only at its own locked slots (`CdtAtL`), discharged from the history, so the all-slot `MdbLk` / `NullLk` [J] is gone. The IPC-buffer words are gate-owned, so `BufSH` is kept along an execution and gives the PTE slots' `bufU`. Boot corollaries at w0/w1 (`w0_serial_mdbL`, `w1_serial_mdbL`). **Half 2 (the gate and the locks themselves).** `proofs/Fl4P2Base/GateImpl.lean` hand-transcribes fl4-sync's gate (`try_enter_local`, `leave_local`, `acquire`, the serial body, `release`) and fl4-store's lock table (`try_lock_object`, `unlock_held`), plus hardware writes, as `ICfg` / `IStepG` / `IStepL` / `IStepHw` (listed in `TRUSTED` with its modelling choices). `impl_sim` matches every runtime step by zero or one gate-model step (`StepR`: a `Serial.Step`, or a racy speculative read returning another value; on gate- or core-class words a value of the current class), keeping `Rel` and the lock invariant `LkInv`; hardware writes during a pending serial body are deferred and replayed after the model's `serial` at the release's decisive store. Racy reads are covered by weak safety `SafeW` from the same per-path certificates. `impl_execPA` / `serializable_implPA` (`GateExecA`): every runtime execution from boot is an FL4 execution, and where no local path runs and no body is pending its memory is the serial run of the completed entries; `w0_serializable_impl` / `w1_serializable_impl` (`GateBootA`) at the boot witnesses for `fl4LocPBL`. **Premises and hypotheses.** - Named premises added: [P] MM-SB, MM-DRF, MM-RACY, IPI (the transcription's step granularity, stated in `GateImpl`'s docstring; no Lean hypothesis carries them). `IHwPA` is `HwStepPA`'s existing [P] moved to the runtime. No [W]. - Theorem hypotheses left to the serial-kernel side: `hSer` / `hSerB` (serial entries keep `MdbSH` / `BufSH`; AArch64 P1 / S1A) and `BufSH` at w0/w1 (S1A / Boot). - Not yet proved: the Half 1 history facts along the weak executions `ExecPAR` (proved along `ExecPA`). **Merge with losfair#146.** Text conflicts only: `proofs/Fl4ProofsA64.lean` (union of imports, no duplicates) and `DESIGN.md` §9 status (main's `w1_sysL` kept; this PR's item-4 bullets added; the "Not yet proved" bullet reconciled: `SysL` at w1 is no longer listed). No proof conflicts. Existing declarations: 0 statement changes against the pre-rebase branch. **Checks.** - `Fl4ProofsA64` root build on this tree: 0 errors, 0 sorry, "Build completed successfully (5755 jobs)". Module builds of every changed module and its users (the gate files, the A64 P2 files of this PR, and the x86 `Fl4Proofs.P2` re-export modules): 0 errors, 0 sorry (5548 jobs). - Axioms: sweep of all 18882 constants under `Fl4ProofsA64.P2` and `Fl4Proofs.P2` (`Fl4P2Base`): 0 outside propext / Classical.choice / Quot.sound; plus 109 `#print axioms` on the gate files' and `GateBootA`'s theorems: 68 `[propext, Classical.choice, Quot.sound]`, 21 `[propext]`, 3 `[propext, Quot.sound]`, 17 none, 0 `sorryAx`. - No sorry / admit / native_decide / bv_decide / axiom / maxHeartbeats in the diff; every new module is imported from `Fl4ProofsA64`. - `python3 xtask/scripts/port_p2_a64.py --check proofs`: exit 0. - No x86 root build: the x86 users of `Fl4P2Base` are the unchanged re-export modules `Fl4Proofs.P2.Serial` / `SerialHw` / `SafeCert` / `SerialSafe`, built as modules. Co-Authored-By: Claude Opus 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.
DESIGN §9 item 4, both halves, for AArch64. One commit on
main@c98a08b1c(after #146 and #147): 34 files, +9216 / −199. No Rust changes (nothing undercrates/). No x86 statement changes.Half 1 (the history along an execution). A replay record
InvRbesideInvH; P1's MDB tree facts hold of the replayed history (MdbSH) along every execution of the local-path family, every slot's edit being one of P1's (SlotWireP). The top family isfl4LocPBL(DelLkA): the Delete-with-PTE start needs the CDT facts only at its own locked slots (CdtAtL), discharged from the history, so the all-slotMdbLk/NullLk[J] is gone. The IPC-buffer words are gate-owned, soBufSHis kept along an execution and gives the PTE slots'bufU. Boot corollaries at w0/w1 (w0_serial_mdbL,w1_serial_mdbL).Half 2 (the gate and the locks themselves).
proofs/Fl4P2Base/GateImpl.leanhand-transcribes fl4-sync's gate (try_enter_local,leave_local,acquire, the serial body,release) and fl4-store's lock table (try_lock_object,unlock_held), plus hardware writes, asICfg/IStepG/IStepL/IStepHw(listed inTRUSTEDwith its modelling choices).impl_simmatches every runtime step by zero or one gate-model step (StepR: aSerial.Step, or a racy speculative read returning another value; on gate- or core-class words a value of the current class), keepingReland the lock invariantLkInv; hardware writes during a pending serial body are deferred and replayed after the model'sserialat the release's decisive store. Racy reads are covered by weak safetySafeWfrom the same per-path certificates.impl_execPA/serializable_implPA(GateExecA): every runtime execution from boot is an FL4 execution, and where no local path runs and no body is pending its memory is the serial run of the completed entries;w0_serializable_impl/w1_serializable_impl(GateBootA) at the boot witnesses forfl4LocPBL.Premises and hypotheses.
GateImpl's docstring; no Lean hypothesis carries them).IHwPAisHwStepPA's existing [P] moved to the runtime. No [W].hSer/hSerB(serial entries keepMdbSH/BufSH; AArch64 P1 / S1A) andBufSHat w0/w1 (S1A / Boot).ExecPAR(proved alongExecPA).Merge with #146. Text conflicts only:
proofs/Fl4ProofsA64.lean(union of imports, no duplicates) andDESIGN.md§9 status (main'sw1_sysLkept; this PR's item-4 bullets added; the "Not yet proved" bullet reconciled:SysLat w1 is no longer listed). No proof conflicts. Existing declarations: 0 statement changes against the pre-rebase branch.Checks.
Fl4ProofsA64root build on this tree: 0 errors, 0 sorry, "Build completed successfully (5755 jobs)". Module builds of every changed module and its users (the gate files, the A64 P2 files of this PR, and the x86Fl4Proofs.P2re-export modules): 0 errors, 0 sorry (5548 jobs).Fl4ProofsA64.P2andFl4Proofs.P2(Fl4P2Base): 0 outside propext / Classical.choice / Quot.sound; plus 109#print axiomson the gate files' andGateBootA's theorems: 68[propext, Classical.choice, Quot.sound], 21[propext], 3[propext, Quot.sound], 17 none, 0sorryAx.Fl4ProofsA64.python3 xtask/scripts/port_p2_a64.py --check proofs: exit 0.Fl4P2Baseare the unchanged re-export modulesFl4Proofs.P2.Serial/SerialHw/SafeCert/SerialSafe, built as modules.proofs/Fl4Proofs.leanadds four imports,Fl4P2Base.SerialW/GateImpl/GateLock/SafeW(all built in the module and A64 builds; no name collision with x86Fl4Proofs.P2.GlueAdeq).🤖 Generated with Claude Code