Skip to content

Commit 42ca7a9

Browse files
committed
Merge branch 'main' into sync-2025-10-09
2 parents f526099 + d673526 commit 42ca7a9

File tree

11 files changed

+2241
-451
lines changed

11 files changed

+2241
-451
lines changed

.github/workflows/verifast-negative.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ jobs:
3030
- name: Install VeriFast
3131
run: |
3232
cd ~
33-
curl -OL https://github.com/verifast/verifast/releases/download/25.07/verifast-25.07-linux.tar.gz
34-
# https://github.com/verifast/verifast/attestations/8998468
35-
echo '48d2c53b4a6e4ba6bf03bd6303dbd92a02bfb896253c06266b29739c78bad23b verifast-25.07-linux.tar.gz' | shasum -a 256 -c
36-
tar xf verifast-25.07-linux.tar.gz
33+
curl -OL https://github.com/verifast/verifast/releases/download/25.08/verifast-25.08-linux.tar.gz
34+
# https://github.com/verifast/verifast/attestations/10123891
35+
echo '1e40019d6add91bf72141c86f4007f2fe1eef67f453cb7fb8f1f5ab7d31d509f verifast-25.08-linux.tar.gz' | shasum -a 256 -c
36+
tar xf verifast-25.08-linux.tar.gz
3737
3838
- name: Install the Rust toolchain used by VeriFast
3939
run: rustup toolchain install nightly-2025-04-09
4040

4141
- name: Run VeriFast Verification
4242
run: |
43-
export PATH=~/verifast-25.07/bin:$PATH
43+
export PATH=~/verifast-25.08/bin:$PATH
4444
cd verifast-proofs
4545
bash check-verifast-proofs-negative.sh

.github/workflows/verifast.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,17 @@ jobs:
2727
- name: Install VeriFast
2828
run: |
2929
cd ~
30-
curl -OL https://github.com/verifast/verifast/releases/download/25.07/verifast-25.07-linux.tar.gz
31-
# https://github.com/verifast/verifast/attestations/8998468
32-
echo '48d2c53b4a6e4ba6bf03bd6303dbd92a02bfb896253c06266b29739c78bad23b verifast-25.07-linux.tar.gz' | shasum -a 256 -c
33-
tar xf verifast-25.07-linux.tar.gz
30+
curl -OL https://github.com/verifast/verifast/releases/download/25.08/verifast-25.08-linux.tar.gz
31+
# https://github.com/verifast/verifast/attestations/10123891
32+
echo '1e40019d6add91bf72141c86f4007f2fe1eef67f453cb7fb8f1f5ab7d31d509f verifast-25.08-linux.tar.gz' | shasum -a 256 -c
33+
tar xf verifast-25.08-linux.tar.gz
3434
3535
- name: Install the Rust toolchain used by VeriFast
3636
run: rustup toolchain install nightly-2025-04-09
3737

3838
- name: Run VeriFast Verification
3939
run: |
40-
export PATH=~/verifast-25.07/bin:$PATH
40+
export PATH=~/verifast-25.08/bin:$PATH
4141
cd verifast-proofs
4242
bash check-verifast-proofs.sh
4343

doc/src/challenges/0001-core-transmutation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- **Tracking Issue:** [#19](https://github.com/model-checking/verify-rust-std/issues/19)
55
- **Start date:** *2024/06/12*
66
- **End date:** *2025/04/10*
7-
- **Reward:** *N/A*
7+
- **Reward:** *10000 USD*
88
- **Contributors**: [Alex Le Blanc](https://github.com/AlexLB99), [Patrick Lam](https://github.com/patricklam)
99

1010
-------------------

library/core/src/ub_checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub use predicates::*;
193193
#[cfg(not(kani))]
194194
mod predicates {
195195
/// Checks if a pointer can be dereferenced, ensuring:
196-
/// * `src` is valid for reads (see [`crate::ptr`] documentation).
196+
/// * `src` is valid for reads and writes (see [`crate::ptr`] documentation).
197197
/// * `src` is properly aligned (use `read_unaligned` if not).
198198
/// * `src` points to a properly initialized value of type `T`.
199199
///

scripts/kani-std-analysis/metrics-data-core.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,94 @@
732732
"verified_safe_fns_under_contract": 111,
733733
"verified_safe_fns_with_loop_under_contract": 0,
734734
"total_functions_under_contract_all_crates": 417
735+
},
736+
{
737+
"date": "2025-10-19",
738+
"total_unsafe_fns": 7235,
739+
"total_unsafe_fns_with_loop": 22,
740+
"total_safe_abstractions": 1936,
741+
"total_safe_abstractions_with_loop": 90,
742+
"total_safe_fns": 16014,
743+
"total_safe_fns_with_loop": 778,
744+
"unsafe_fns_under_contract": 290,
745+
"unsafe_fns_with_loop_under_contract": 3,
746+
"verified_unsafe_fns_under_contract": 254,
747+
"verified_unsafe_fns_with_loop_under_contract": 1,
748+
"safe_abstractions_under_contract": 77,
749+
"safe_abstractions_with_loop_under_contract": 0,
750+
"verified_safe_abstractions_under_contract": 77,
751+
"verified_safe_abstractions_with_loop_under_contract": 0,
752+
"safe_fns_under_contract": 115,
753+
"safe_fns_with_loop_under_contract": 1,
754+
"verified_safe_fns_under_contract": 112,
755+
"verified_safe_fns_with_loop_under_contract": 1,
756+
"total_functions_under_contract_all_crates": 424
757+
},
758+
{
759+
"date": "2025-11-09",
760+
"total_unsafe_fns": 7235,
761+
"total_unsafe_fns_with_loop": 22,
762+
"total_safe_abstractions": 1936,
763+
"total_safe_abstractions_with_loop": 90,
764+
"total_safe_fns": 16014,
765+
"total_safe_fns_with_loop": 778,
766+
"unsafe_fns_under_contract": 290,
767+
"unsafe_fns_with_loop_under_contract": 3,
768+
"verified_unsafe_fns_under_contract": 254,
769+
"verified_unsafe_fns_with_loop_under_contract": 1,
770+
"safe_abstractions_under_contract": 77,
771+
"safe_abstractions_with_loop_under_contract": 0,
772+
"verified_safe_abstractions_under_contract": 77,
773+
"verified_safe_abstractions_with_loop_under_contract": 0,
774+
"safe_fns_under_contract": 115,
775+
"safe_fns_with_loop_under_contract": 1,
776+
"verified_safe_fns_under_contract": 112,
777+
"verified_safe_fns_with_loop_under_contract": 1,
778+
"total_functions_under_contract_all_crates": 424
779+
},
780+
{
781+
"date": "2025-11-16",
782+
"total_unsafe_fns": 7235,
783+
"total_unsafe_fns_with_loop": 22,
784+
"total_safe_abstractions": 1936,
785+
"total_safe_abstractions_with_loop": 90,
786+
"total_safe_fns": 16014,
787+
"total_safe_fns_with_loop": 778,
788+
"unsafe_fns_under_contract": 290,
789+
"unsafe_fns_with_loop_under_contract": 3,
790+
"verified_unsafe_fns_under_contract": 254,
791+
"verified_unsafe_fns_with_loop_under_contract": 1,
792+
"safe_abstractions_under_contract": 77,
793+
"safe_abstractions_with_loop_under_contract": 0,
794+
"verified_safe_abstractions_under_contract": 77,
795+
"verified_safe_abstractions_with_loop_under_contract": 0,
796+
"safe_fns_under_contract": 115,
797+
"safe_fns_with_loop_under_contract": 1,
798+
"verified_safe_fns_under_contract": 112,
799+
"verified_safe_fns_with_loop_under_contract": 1,
800+
"total_functions_under_contract_all_crates": 424
801+
},
802+
{
803+
"date": "2025-11-23",
804+
"total_unsafe_fns": 7235,
805+
"total_unsafe_fns_with_loop": 22,
806+
"total_safe_abstractions": 1936,
807+
"total_safe_abstractions_with_loop": 90,
808+
"total_safe_fns": 16014,
809+
"total_safe_fns_with_loop": 778,
810+
"unsafe_fns_under_contract": 290,
811+
"unsafe_fns_with_loop_under_contract": 3,
812+
"verified_unsafe_fns_under_contract": 254,
813+
"verified_unsafe_fns_with_loop_under_contract": 1,
814+
"safe_abstractions_under_contract": 77,
815+
"safe_abstractions_with_loop_under_contract": 0,
816+
"verified_safe_abstractions_under_contract": 77,
817+
"verified_safe_abstractions_with_loop_under_contract": 0,
818+
"safe_fns_under_contract": 115,
819+
"safe_fns_with_loop_under_contract": 1,
820+
"verified_safe_fns_under_contract": 112,
821+
"verified_safe_fns_with_loop_under_contract": 1,
822+
"total_functions_under_contract_all_crates": 424
735823
}
736824
]
737825
}

scripts/kani-std-analysis/metrics-data-std.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,6 +615,94 @@
615615
"verified_safe_fns_under_contract": 0,
616616
"verified_safe_fns_with_loop_under_contract": 0,
617617
"total_functions_under_contract_all_crates": 417
618+
},
619+
{
620+
"date": "2025-10-19",
621+
"total_unsafe_fns": 180,
622+
"total_unsafe_fns_with_loop": 12,
623+
"total_safe_abstractions": 510,
624+
"total_safe_abstractions_with_loop": 42,
625+
"total_safe_fns": 4115,
626+
"total_safe_fns_with_loop": 185,
627+
"unsafe_fns_under_contract": 10,
628+
"unsafe_fns_with_loop_under_contract": 1,
629+
"verified_unsafe_fns_under_contract": 7,
630+
"verified_unsafe_fns_with_loop_under_contract": 0,
631+
"safe_abstractions_under_contract": 0,
632+
"safe_abstractions_with_loop_under_contract": 0,
633+
"verified_safe_abstractions_under_contract": 0,
634+
"verified_safe_abstractions_with_loop_under_contract": 0,
635+
"safe_fns_under_contract": 0,
636+
"safe_fns_with_loop_under_contract": 0,
637+
"verified_safe_fns_under_contract": 0,
638+
"verified_safe_fns_with_loop_under_contract": 0,
639+
"total_functions_under_contract_all_crates": 424
640+
},
641+
{
642+
"date": "2025-11-09",
643+
"total_unsafe_fns": 180,
644+
"total_unsafe_fns_with_loop": 12,
645+
"total_safe_abstractions": 510,
646+
"total_safe_abstractions_with_loop": 42,
647+
"total_safe_fns": 4115,
648+
"total_safe_fns_with_loop": 185,
649+
"unsafe_fns_under_contract": 10,
650+
"unsafe_fns_with_loop_under_contract": 1,
651+
"verified_unsafe_fns_under_contract": 7,
652+
"verified_unsafe_fns_with_loop_under_contract": 0,
653+
"safe_abstractions_under_contract": 0,
654+
"safe_abstractions_with_loop_under_contract": 0,
655+
"verified_safe_abstractions_under_contract": 0,
656+
"verified_safe_abstractions_with_loop_under_contract": 0,
657+
"safe_fns_under_contract": 0,
658+
"safe_fns_with_loop_under_contract": 0,
659+
"verified_safe_fns_under_contract": 0,
660+
"verified_safe_fns_with_loop_under_contract": 0,
661+
"total_functions_under_contract_all_crates": 424
662+
},
663+
{
664+
"date": "2025-11-16",
665+
"total_unsafe_fns": 180,
666+
"total_unsafe_fns_with_loop": 12,
667+
"total_safe_abstractions": 510,
668+
"total_safe_abstractions_with_loop": 42,
669+
"total_safe_fns": 4115,
670+
"total_safe_fns_with_loop": 185,
671+
"unsafe_fns_under_contract": 10,
672+
"unsafe_fns_with_loop_under_contract": 1,
673+
"verified_unsafe_fns_under_contract": 7,
674+
"verified_unsafe_fns_with_loop_under_contract": 0,
675+
"safe_abstractions_under_contract": 0,
676+
"safe_abstractions_with_loop_under_contract": 0,
677+
"verified_safe_abstractions_under_contract": 0,
678+
"verified_safe_abstractions_with_loop_under_contract": 0,
679+
"safe_fns_under_contract": 0,
680+
"safe_fns_with_loop_under_contract": 0,
681+
"verified_safe_fns_under_contract": 0,
682+
"verified_safe_fns_with_loop_under_contract": 0,
683+
"total_functions_under_contract_all_crates": 424
684+
},
685+
{
686+
"date": "2025-11-23",
687+
"total_unsafe_fns": 180,
688+
"total_unsafe_fns_with_loop": 12,
689+
"total_safe_abstractions": 510,
690+
"total_safe_abstractions_with_loop": 42,
691+
"total_safe_fns": 4115,
692+
"total_safe_fns_with_loop": 185,
693+
"unsafe_fns_under_contract": 10,
694+
"unsafe_fns_with_loop_under_contract": 1,
695+
"verified_unsafe_fns_under_contract": 7,
696+
"verified_unsafe_fns_with_loop_under_contract": 0,
697+
"safe_abstractions_under_contract": 0,
698+
"safe_abstractions_with_loop_under_contract": 0,
699+
"verified_safe_abstractions_under_contract": 0,
700+
"verified_safe_abstractions_with_loop_under_contract": 0,
701+
"safe_fns_under_contract": 0,
702+
"safe_fns_with_loop_under_contract": 0,
703+
"verified_safe_fns_under_contract": 0,
704+
"verified_safe_fns_with_loop_under_contract": 0,
705+
"total_functions_under_contract_all_crates": 424
618706
}
619707
]
620708
}

verifast-proofs/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22

33
This directory contains [VeriFast](../doc/src/tools/verifast.md) proofs for (currently a very, very small) part of the standard library.
44

5-
> [!NOTE]
6-
> TL;DR: If the VeriFast CI action fails because of a failing diff, please run `verifast-proofs/patch-verifast-proofs.sh` to fix the problem.
5+
Specifically, it currently contains the following proofs:
6+
7+
- Partial proof of [LinkedList](alloc/collections/linked_list.rs/)
8+
- Partial proof of [RawVec](alloc/raw_vec/mod.rs/)
9+
10+
See each proof's accompanying README for a tour of the proof and applicable caveats.
11+
12+
## Maintaining the proofs
13+
14+
If the VeriFast CI action fails because of a failing diff, please run `cd verifast-proofs; ./patch-verifast-proofs.sh` to fix the problem.
15+
16+
## `-skip_specless_fns`
717

818
VeriFast supports selecting the code to verify on a function-by-function basis. By default, when given a `.rs` file VeriFast will try to verify [semantic well-typedness](https://verifast.github.io/verifast/rust-reference/non-unsafe-funcs.html) of all non-`unsafe` functions in that file (and in any submodules), and will require that the user provide specifications for all `unsafe` functions, which it will then verify against those specifications. However, when given the `-skip_specless_fns` command-line flag, VeriFast will skip all functions for which the user did not provide a specification.
919

verifast-proofs/alloc/collections/linked_list.rs/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ fn pop_front_node<'a>(&'a mut self) -> Option<Box<Node<T>, &'a A>>
382382
//@ open [?f]ref_initialized_::<A>(alloc_ref1)();
383383
let alloc_ref = &self.alloc;
384384

385-
r = match head {
385+
r = match head {
386386
None => {
387387
//@ close [f]ref_initialized_::<A>(alloc_ref)();
388388
//@ close_frac_borrow(f, ref_initialized_(alloc_ref));
@@ -572,13 +572,12 @@ closes it back up afterwards.
572572
First of all, this proof was performed with the following VeriFast command-line flags:
573573
- `-skip_specless_fns`: VeriFast ignores the functions that do not have a `req` or `ens` clause.
574574
- `-ignore_unwind_paths`: This proof ignores code that is reachable only when unwinding.
575-
- `-allow_assume`: This proof uses a number of `assume` ghost statements and `assume_correct` clauses. These must be carefully audited.
575+
- `-allow_assume`: This proof uses a number of `assume` ghost statements and `assume_correct` clauses. These must be carefully audited. Specifically, this proof uses `assume` statements to assume that the lifetime of the allocator used by the LinkedList value equals `'static`, i.e. this proof only applies if the global allocator or another allocator that lasts forever is used.
576576

577577
Secondly, since VeriFast uses the `rustc` frontend, which assumes a particular target architecture, VeriFast's results hold only for the used Rust toolchain's target architecture. When VeriFast reports "0 errors found" for a Rust program, it always reports the targeted architecture as well (e.g. `0 errors found (2149 statements verified) (target: x86_64-unknown-linux-gnu (LP64))`).
578578

579579
Thirdly, VeriFast has a number of [known unsoundnesses](https://github.com/verifast/verifast/issues?q=is%3Aissue+is%3Aopen+label%3Aunsoundness) (reasons why VeriFast might in some cases incorrectly accept a program), including the following:
580580
- VeriFast does not yet fully verify compliance with Rust's [pointer aliasing rules](https://doc.rust-lang.org/reference/behavior-considered-undefined.html).
581581
- VeriFast does not yet properly verify compliance of custom type interpretations with Rust's [variance](https://doc.rust-lang.org/reference/subtyping.html#variance) rules.
582-
- The current standard library specifications do not [prevent an allocated memory block from outliving its allocator](https://github.com/verifast/verifast/issues/829). This is sound only if the global allocator is used.
583582

584583
Fourthly, unlike foundational tools such as [RefinedRust](https://plv.mpi-sws.org/refinedrust/), VeriFast has not itself been verified, so there are undoubtedly also unknown unsoundnesses. Such unsoundnesses might exist in VeriFast's [symbolic execution engine](https://github.com/model-checking/verify-rust-std/issues/213#issuecomment-2531006855) [itself](https://github.com/model-checking/verify-rust-std/issues/213#issuecomment-2534922580) or in its [prelude](https://github.com/verifast/verifast/tree/master/bin/rust) (definitions and axioms automatically imported at the start of every verification run) or in the [specifications](https://github.com/verifast/verifast/blob/master/bin/rust/std/lib.rsspec) it uses for the Rust standard library functions called by the program being verified.

0 commit comments

Comments
 (0)