Skip to content

WIP: Weak memory support#487

Draft
hiroki-chen wants to merge 3 commits into
asterinas:mainfrom
hiroki-chen:weak-memory
Draft

WIP: Weak memory support#487
hiroki-chen wants to merge 3 commits into
asterinas:mainfrom
hiroki-chen:weak-memory

Conversation

@hiroki-chen
Copy link
Copy Markdown
Collaborator

Ok so the weak memory has been started, and this serves as the triage PR for this feature. The core idea behind this implementation to encode message histories (parameterized by the timerstamp token) for each memory location as ghost states in the concurrent separation logic which allows the caller to open the invariant and obtain the handle to the underlying data.

Basically, the roadmap includes:

  • Modelling the "weak" part (i.e., memory ordering) of the atomic operations. This includes adding new atomic wrapper types from the Rust std library and stopping using the vstd's atomic types at all (since they assume SC).
  • Introduce idomatic macros, types, and interfaces for proving around our customized atomic types.
  • Use the atomic types to prove the RCU reclamation as well as the traversal security properties.

@hiroki-chen hiroki-chen self-assigned this Jun 1, 2026
@hiroki-chen hiroki-chen added enhancement New general lemmas in vstd_extra, or new tooling features model design Model or specification of system design exec code Proofs about execution code labels Jun 1, 2026
@hiroki-chen
Copy link
Copy Markdown
Collaborator Author

Reference https://dl.acm.org/doi/pdf/10.1145/3729246 and https://dl.acm.org/doi/pdf/10.1145/3591297

There is no need to model the full C11 semantics (they are even flawed) so we just do an in-order spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New general lemmas in vstd_extra, or new tooling features exec code Proofs about execution code model design Model or specification of system design

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant