-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VeriFast solution for Challenge 5 (linked_list.rs) #238
base: main
Are you sure you want to change the base?
Conversation
Hi @btj, may I ask what was the motivation behind the diff? We do ask people to refrain from making changes to the existing code, so it would be nice to understand the motivation behind it. Thanks! |
Well, the challenge says "The solution cannot impact the runtime logic of the standard library" so I figured that changes that
Unless I overlooked something, the remaining changes have been eliminated by recent VeriFast improvements so they are no longer relevant. See the new version of the diff; this version of the proof was done with VeriFast 25.01, released today. |
This PR adds a VeriFast proof that the LinkedList APIs enumerated in Challenge 5 have the properties enumerated in the Challenge.
Note that VeriFast has some known unsoundnesses and may also have unknown unsoundnesses, since it is a non-foundational tool (unlike e.g. RefinedRust.)
Note also that I made some minor changes to the code of linked_list.rs. A diff is at
verifast-proofs/alloc/collections/linked_list.code-changes.diff
.Note, furthermore, that this proof uses a few
assume
statements. Incorrect use ofassume
statements can of course lead to unsoundness.This PR is based on the solution that I announced originally in the #29 thread; since then, I have resolved some VeriFast unsoundnesses and made some other improvements (such as bringing down the verification time for linked_list.rs significantly). I will be happy to produce a new VeriFast release and either update this PR or submit a new one to use the new VeriFast release if that is desired.
See some more details in the #29 thread.
Note: the VeriFast tool application issue (#213) is still open; it should probably be resolved before this PR is accepted. I'm submitting this PR at this point to inform the creation of the tool PR.
Resolves #29.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.