Commit 1231f86
authored
VeriFast solution for Challenge 5 (linked_list.rs) (#238)
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](https://github.com/verifast/verifast/blob/master/tests/rust/README.md)
and may also have unknown unsoundnesses, since it is a non-foundational
tool (unlike e.g. [RefinedRust](https://plv.mpi-sws.org/refinedrust/).)
*Addendum, 2025-01-23*: Note, in particular, that VeriFast 24.12 ignores
unwind paths, and, if the `-ignore_unwind_paths` flag is specified on
the command line, so does VeriFast 25.01. The 25.01 version of the proof
specifies `-ignore_unwind_paths`. So neither version of the proof
verifies unwind paths.
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 of `assume` 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.1 parent ca49535 commit 1231f86
File tree
6 files changed
+2671
-119
lines changed- doc/src/challenges
- verifast-proofs
- alloc/collections/linked_list.rs
- original
- verified
6 files changed
+2671
-119
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 584 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
0 commit comments