Skip to content

Draft: Add spin lock example.#2075

Draft
jhjourdan wants to merge 2 commits intomasterfrom
spin_lock
Draft

Draft: Add spin lock example.#2075
jhjourdan wants to merge 2 commits intomasterfrom
spin_lock

Conversation

@jhjourdan
Copy link
Copy Markdown
Collaborator

This is an attempt at verifying a spin lock implementation.

I am reasonably satisfied with these examples, which are not so long, and which the SMT solvers solve quite easily. There is one problem in both the SC version and the RelAcq version: we cannot prove the into_inner function, because we cannot setup a "contract" that a FullBorrow should follow and which BorrowEnd may rely on. Without that, it is impossible to prove in into_inner that the permission that we get back is indeed the permission for the location protected by the lock.

@jhjourdan
Copy link
Copy Markdown
Collaborator Author

Cc @dianegolfouse we need to discuss this: how shouldwe make into_inner provable.

@jhjourdan jhjourdan marked this pull request as draft April 28, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant