Skip to content

Commit 9572a82

Browse files
committed
Check VeriFast proofs
1 parent 2b2baa8 commit 9572a82

File tree

7 files changed

+7489
-0
lines changed

7 files changed

+7489
-0
lines changed

.github/workflows/verifast.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: VeriFast
2+
3+
on:
4+
workflow_dispatch:
5+
merge_group:
6+
pull_request:
7+
branches: [ main ]
8+
push:
9+
paths:
10+
- 'library/**'
11+
- '.github/workflows/verifast.yml'
12+
- 'verifast-proofs/**'
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
check-verifast-on-std:
20+
name: Verify std library
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout Repository
25+
uses: actions/checkout@v4
26+
with:
27+
path: head
28+
submodules: true
29+
30+
- name: Install VeriFast
31+
run: |
32+
cd ~
33+
curl -OL https://github.com/verifast/verifast/releases/download/24.12/verifast-24.12-linux.tar.gz
34+
echo '51bebf990f31666abcd3675000e7714ef79b417390e930953ef25383e8d59421 verifast-24.12-linux.tar.gz' | shasum -a 256 -c
35+
tar xf verifast-24.12-linux.tar.gz
36+
37+
- name: Run VeriFast Verification
38+
run: |
39+
export PATH=~/verifast-24.12/bin:$PATH
40+
cd verifast-proofs
41+
mysh check-verifast-proofs.mysh

verifast-proofs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.stripped.rs
2+
*.computed.diff
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
diff linked_list.original.rs ../../../library/alloc/src/collections/linked_list.rs
2+
vfstrip < linked_list.verifast-proof.rs > linked_list.verifast-proof.stripped.rs
3+
diff linked_list.original.rs linked_list.verifast-proof.stripped.rs > linked_list.code-changes.computed.diff; diff linked_list.code-changes.diff linked_list.code-changes.computed.diff
4+
verifast -rustc_arg --crate-name -rustc_arg linked_list -c -prover z3v4.5 -skip_specless_fns linked_list.verifast-proof.rs

0 commit comments

Comments
 (0)