Skip to content

Commit 54e0fef

Browse files
committed
VeriFast solution for challenge 19 (RawVec)
1 parent 34236a6 commit 54e0fef

File tree

11 files changed

+3938
-14
lines changed

11 files changed

+3938
-14
lines changed

.github/workflows/verifast-negative.yml

Lines changed: 6 additions & 6 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.02/verifast-25.02-linux.tar.gz
34-
# https://github.com/verifast/verifast/attestations/4911733
35-
echo '5d5c87d11b3d735f44c3f0ca52aebc89e3c4d1119d98ef25188d07cb57ad65e8 verifast-25.02-linux.tar.gz' | shasum -a 256 -c
36-
tar xf verifast-25.02-linux.tar.gz
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
3737
3838
- name: Install the Rust toolchain used by VeriFast
39-
run: rustup toolchain install nightly-2024-11-23
39+
run: rustup toolchain install nightly-2025-04-09
4040

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

.github/workflows/verifast.yml

Lines changed: 6 additions & 6 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.02/verifast-25.02-linux.tar.gz
31-
# https://github.com/verifast/verifast/attestations/4911733
32-
echo '5d5c87d11b3d735f44c3f0ca52aebc89e3c4d1119d98ef25188d07cb57ad65e8 verifast-25.02-linux.tar.gz' | shasum -a 256 -c
33-
tar xf verifast-25.02-linux.tar.gz
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
3434
3535
- name: Install the Rust toolchain used by VeriFast
36-
run: rustup toolchain install nightly-2024-11-23
36+
run: rustup toolchain install nightly-2025-04-09
3737

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

verifast-proofs/alloc/collections/linked_list.rs/verified/linked_list.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use super::SpecExtend;
2323
use crate::alloc::{Allocator, Global};
2424
use crate::boxed::Box;
2525

26-
//@ use std::alloc::{alloc_block_in, Layout, Global, Allocator};
26+
//@ use std::alloc::{alloc_id_t, alloc_block_in, Layout, Global, Allocator};
2727
//@ use std::option::{Option, Option::None, Option::Some};
2828
//@ use std::ptr::{NonNull, NonNull_ptr};
2929

@@ -70,7 +70,7 @@ struct Node<T> {
7070

7171
/*@
7272
73-
pred Nodes<T>(alloc_id: any, n: Option<NonNull<Node<T>>>, prev: Option<NonNull<Node<T>>>, last: Option<NonNull<Node<T>>>, next: Option<NonNull<Node<T>>>; nodes: list<NonNull<Node<T>>>) =
73+
pred Nodes<T>(alloc_id: alloc_id_t, n: Option<NonNull<Node<T>>>, prev: Option<NonNull<Node<T>>>, last: Option<NonNull<Node<T>>>, next: Option<NonNull<Node<T>>>; nodes: list<NonNull<Node<T>>>) =
7474
if n == next {
7575
nodes == [] &*& last == prev
7676
} else {
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// verifast_options{skip_specless_fns}
2+
3+
#![allow(dead_code)]
4+
#![no_std]
5+
#![allow(internal_features)]
6+
#![allow(incomplete_features)]
7+
#![feature(allocator_api)]
8+
#![feature(staged_api)]
9+
#![feature(rustc_attrs)]
10+
#![feature(dropck_eyepatch)]
11+
#![feature(specialization)]
12+
#![feature(extend_one)]
13+
#![feature(exact_size_is_empty)]
14+
#![feature(hasher_prefixfree_extras)]
15+
#![feature(box_into_inner)]
16+
#![feature(try_trait_v2)]
17+
#![feature(optimize_attribute)]
18+
#![feature(temporary_niche_types)]
19+
#![feature(ptr_internals)]
20+
#![feature(try_reserve_kind)]
21+
#![feature(ptr_alignment_type)]
22+
#![feature(sized_type_properties)]
23+
#![feature(std_internals)]
24+
#![feature(alloc_layout_extra)]
25+
#![feature(nonnull_provenance)]
26+
#![feature(panic_internals)]
27+
28+
#![stable(feature = "rust1", since = "1.0.0")]
29+
30+
extern crate alloc as std;
31+
32+
#[stable(feature = "rust1", since = "1.0.0")]
33+
pub use std::alloc as alloc;
34+
#[stable(feature = "rust1", since = "1.0.0")]
35+
pub use std::boxed as boxed;
36+
#[stable(feature = "rust1", since = "1.0.0")]
37+
pub use std::collections as collections;
38+
39+
pub mod raw_vec;

0 commit comments

Comments
 (0)