Skip to content

Commit e290870

Browse files
committed
Merge remote-tracking branch 'origin/main' into challenge-10-string
2 parents 000ac80 + cd371e0 commit e290870

1,789 files changed

Lines changed: 552695 additions & 147480 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/CODEOWNERS‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @model-checking/kani-devs
1+
* @model-checking/verify-rust-std-committee

‎.github/pull_requests.toml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ members = [
33
"celinval",
44
"rahulku",
55
"pnkfelix",
6-
"adpaco-aws",
76
"feliperodri",
8-
"zhassan-aws",
97
"remi-delmas-3000",
10-
"qinheping",
118
"tautschnig",
129
"patricklam",
1310
"ranjitjhala",
1411
"carolynzech",
15-
"robdockins",
1612
"HuStmpHrrr",
17-
"Eh2406",
1813
"jswrenn",
1914
"havelund",
2015
"jorajeev",
2116
"rajath-mk",
22-
"thanhnguyen-aws"
17+
"thanhnguyen-aws",
18+
"btj",
19+
"rafaelsamenezes",
20+
"lucasccordeiro",
21+
"dkcumming",
22+
"DiuDiu777"
2323
]

‎.github/workflows/book.yml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ jobs:
1818
- name: Checkout
1919
uses: actions/checkout@v4
2020

21+
# Build the book tools with stable: inside this repo, rust-toolchain.toml would select the
22+
# pinned nightly, whose proc_macro no longer has features older dependencies rely on.
2123
- name: Install mdbook
2224
run: |
23-
cargo install mdbook --version "^0.4" --locked
25+
cargo +stable install mdbook --version "^0.4" --locked
2426
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
2527
2628
# Removed --locked for now since it is broken due to old proc_macro feature.
2729
- name: Install linkchecker
28-
run: cargo install mdbook-linkcheck --version "^0.7"
30+
run: cargo +stable install mdbook-linkcheck --version "^0.7"
2931

3032
- name: Build Documentation
3133
run: mdbook build doc

‎.github/workflows/flux.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88
branches: [main]
99

1010
env:
11-
FLUX_VERSION: "27e3ef52b52253a1d128aff7b80894bed4da0c95"
12-
FIXPOINT_VERSION: "nightly-01-14-2026"
11+
FLUX_VERSION: "849ef7c31ce06ec92e211050ac2f5bc8c543896d"
12+
FIXPOINT_VERSION: "nightly-2026-07-20"
1313

1414
jobs:
1515
check-flux-on-core:

‎.github/workflows/kani.yml‎

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ jobs:
3535
WORKER_INDEX: ${{ matrix.partition }}
3636
# Total number of workers running this step
3737
WORKER_TOTAL: 4
38+
# Cap parallel harness verification on ubuntu-latest: its 4-core/16 GB
39+
# runners get OOM-killed when 4 memory-hungry harnesses (up to ~10 GB
40+
# each, e.g. the ffi::c_str ones) run concurrently.
41+
KANI_JOBS: ${{ matrix.os == 'ubuntu-latest' && 2 || '' }}
3842

3943
steps:
4044
- name: Remove unnecessary software to free up disk space
@@ -97,6 +101,11 @@ jobs:
97101
# Notes:
98102
# - core_arch::x86::__m128d::as_f64x2 is just one example of hundreds of
99103
# core_arch::x86:: functions that are known to verify successfully.
104+
# - __rdl_dealloc/__rdl_realloc are excluded until their contracts require ptr
105+
# to come from the allocator (#712).
106+
# - unicode::unicode_data::conversions::to_* are not listed for now: since the
107+
# Unicode tables were regenerated (nightly-2026-09-25) they exceed the 10m
108+
# timeout on macOS and the ubuntu runner died while verifying them.
100109
- name: Run Kani Verification
101110
run: |
102111
scripts/run-kani.sh --run autoharness --kani-args \
@@ -105,8 +114,10 @@ jobs:
105114
--include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::backward_unchecked" \
106115
--include-pattern "<(.+)[[:space:]]as[[:space:]]iter::range::Step>::forward_unchecked" \
107116
--include-pattern alloc::__default_lib_allocator:: \
117+
--exclude-pattern "alloc::__default_lib_allocator::__rdl_(dealloc|realloc)" \
108118
--include-pattern alloc::layout::Layout::from_size_align \
109119
--include-pattern ascii::ascii_char::AsciiChar::from_u8 \
120+
--include-pattern "<char[[:space:]]as[[:space:]]ascii::AsciiExt>::is_ascii" \
110121
--include-pattern char::convert::from_u32_unchecked \
111122
--include-pattern core_arch::x86::__m128d::as_f64x2 \
112123
--include-pattern "convert::num::<impl.convert::From<num::nonzero::NonZero<" \
@@ -201,7 +212,6 @@ jobs:
201212
--exclude-pattern time::Duration::from_nanos_u128 \
202213
--include-pattern time::Duration::from_secs \
203214
--exclude-pattern time::Duration::from_secs_f \
204-
--include-pattern unicode::unicode_data::conversions::to_ \
205215
--exclude-pattern ::precondition_check \
206216
--harness-timeout 10m \
207217
--default-unwind 1000 \
@@ -251,8 +261,18 @@ jobs:
251261
with:
252262
python-version: '3.x'
253263

264+
- name: Test the metrics script
265+
run: |
266+
pip install -r scripts/kani-std-analysis/requirements.txt
267+
python3 -m unittest discover -s scripts/kani-std-analysis
268+
254269
# Step 2: Run list on the std library
255270
- name: Run Kani Metrics
271+
# Under Kani each library crate takes 1-12 GB to compile; compiling them in parallel
272+
# exceeds the 16 GB of an ubuntu-latest runner, which then dies with "The runner has
273+
# received a shutdown signal". One crate at a time peaks at the largest one (std).
274+
env:
275+
CARGO_BUILD_JOBS: 1
256276
run: |
257277
scripts/run-kani.sh --run metrics --with-autoharness
258278
pushd /tmp/std_lib_analysis
@@ -349,6 +369,11 @@ jobs:
349369

350370
# Step 2: Run list on the std library
351371
- name: Run Kani List
372+
# Under Kani each library crate takes 1-12 GB to compile; compiling them in parallel
373+
# exceeds the 16 GB of an ubuntu-latest runner, which then dies with "The runner has
374+
# received a shutdown signal". One crate at a time peaks at the largest one (std).
375+
env:
376+
CARGO_BUILD_JOBS: 1
352377
run: |
353378
head/scripts/run-kani.sh --run list --with-autoharness --path ${{github.workspace}}/head
354379
# remove duplicate white space to reduce file size (GitHub permits at

‎.github/workflows/kmir.yml‎

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: KMIR
2+
3+
on:
4+
workflow_dispatch:
5+
merge_group:
6+
pull_request:
7+
branches: [ main ]
8+
push:
9+
branches: [ main ]
10+
paths:
11+
- '.github/workflows/kmir.yml'
12+
- 'kmir-proofs/**'
13+
14+
env:
15+
KMIR_VERSION: "ubuntu-jammy-0.4.226"
16+
17+
jobs:
18+
run-kmir-proofs:
19+
name: Run KMIR proofs
20+
runs-on: ubuntu-latest
21+
env:
22+
container_name: "kmir-${{ github.run_id }}"
23+
24+
steps:
25+
- name: Checkout Repository
26+
uses: actions/checkout@v4
27+
28+
- name: Run Challenge 11 Proofs
29+
run: |
30+
docker run --rm -t \
31+
--name ${{ env.container_name }} \
32+
-w /home/kmir/workspace \
33+
-u $(id -u):$(id -g) \
34+
-v $PWD:/home/kmir/workspace \
35+
runtimeverificationinc/kmir:${{ env.KMIR_VERSION }} \
36+
kmir-proofs/0011-floats-ints/run-proofs.sh
37+
38+
run-kmir-proofs-negative:
39+
name: Run KMIR negative proofs
40+
runs-on: ubuntu-latest
41+
env:
42+
container_name: "kmir-neg-${{ github.run_id }}"
43+
44+
steps:
45+
- name: Checkout Repository
46+
uses: actions/checkout@v4
47+
48+
- name: Run Challenge 11 Negative Proofs
49+
run: |
50+
docker run --rm -t \
51+
--name ${{ env.container_name }} \
52+
-w /home/kmir/workspace \
53+
-u $(id -u):$(id -g) \
54+
-v $PWD:/home/kmir/workspace \
55+
runtimeverificationinc/kmir:${{ env.KMIR_VERSION }} \
56+
kmir-proofs/0011-floats-ints/run-proofs.sh --negative

‎.github/workflows/rapx.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: RAPx
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
branches: [main]
9+
10+
env:
11+
RAPX_VERSION: "0.7.50"
12+
TOOLCHAIN: "nightly-2026-02-05"
13+
14+
jobs:
15+
verify-slice:
16+
name: Verify core::slice with RAPx
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
submodules: true
22+
23+
- name: Set up Rust toolchain
24+
run: |
25+
rustup toolchain install $TOOLCHAIN --profile minimal
26+
rustup component add rustc-dev rust-src llvm-tools-preview --toolchain $TOOLCHAIN
27+
28+
- name: Install RAPx
29+
run: |
30+
cargo +$TOOLCHAIN install rapx --version $RAPX_VERSION
31+
32+
- name: Run RAPx verification
33+
run: |
34+
export RUSTUP_TOOLCHAIN=$(rustup show active-toolchain | cut -d ' ' -f 1)
35+
export RAPX_SYSROOT=$(rustc --print sysroot)
36+
export LD_LIBRARY_PATH="$RAPX_SYSROOT/lib"
37+
export RUSTFLAGS="--cfg=rapx -Zcrate-attr=feature(register_tool) -Zcrate-attr=register_tool(rapx)"
38+
export __CARGO_TESTS_ONLY_SRC_ROOT="$(pwd)/library"
39+
cd library/core
40+
cargo +$RUSTUP_TOOLCHAIN rapx verify --module slice --mode targeted 2>&1 | tee /tmp/rapx-output.txt
41+
42+
- name: Assert no UNSOUND results
43+
run: |
44+
if grep -q 'result: UNSOUND' /tmp/rapx-output.txt; then
45+
echo "UNSOUND results found!"
46+
grep 'result: UNSOUND' /tmp/rapx-output.txt
47+
exit 1
48+
fi
49+
echo "All results are SOUND"

‎.github/workflows/update-subtree.yml‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,28 @@ jobs:
146146
uses: peter-evans/create-pull-request@v7
147147
with:
148148
title: 'Update subtree/library to ${{ env.NEXT_TOOLCHAIN_DATE }}'
149-
body: >
150-
This is an automated PR to update the subtree/library branch to the changes
149+
body: |
150+
This is an automated PR to update the `subtree/library` branch to the changes
151151
from ${{ env.CURRENT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.CURRENT_COMMIT_HASH }})
152152
to ${{ env.NEXT_TOOLCHAIN_DATE }} (rust-lang/rust@${{ env.NEXT_COMMIT_HASH }}), inclusive.
153153
154-
**Review this PR as usual, but do not merge this PR using the GitHub web interface.
155-
Instead, once it is approved, use `git push` to literally push the changes to `subtree/library`
156-
without any rebase or merge.**
154+
> [!IMPORTANT]
155+
> **Do NOT use the GitHub "Merge pull request", "Squash and merge", or "Rebase and merge"
156+
> buttons on this PR.** `subtree/library` must stay a verbatim, linear mirror of upstream's
157+
> `library/` directory, regenerated deterministically by `splitsh-lite`. Any web-UI merge
158+
> creates a synthetic commit that is not part of that extraction, which permanently diverges
159+
> the branch and makes *every* future subtree-update PR conflict (and the daily job then keeps
160+
> opening duplicate PRs).
161+
>
162+
> **To land this PR:** review it as usual, and once approved push its commits *literally* to
163+
> `subtree/library` with no rebase and no merge:
164+
>
165+
> ```
166+
> git fetch origin update-subtree/library
167+
> git push origin origin/update-subtree/library:subtree/library
168+
> ```
169+
>
170+
> This PR will close automatically once its commits are on `subtree/library`.
157171
branch: update-subtree/library
158172
delete-branch: true
159173
base: subtree/library

‎.gitignore‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ package-lock.json
4949
## Kani
5050
*.out
5151

52-
## GOTO-Transcoder
53-
goto-transcoder
52+
## ESBMC
53+
esbmc
5454
# Added by cargo
5555
#
5656
# already existing elements were commented out

‎CITATION.cff‎

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
cff-version: 1.2.0
2+
title: Verifying the Rust Standard Library
3+
message: >-
4+
If you use this project in your research, please cite the NFM 2026 paper
5+
listed under `preferred-citation`.
6+
type: software
7+
authors:
8+
- name: The verify-rust-std Contributors
9+
abstract: >-
10+
A fork of the Rust standard library created solely to formally verify the Rust
11+
standard library. The repository is tool-agnostic and integrates complementary
12+
verification tools into its continuous integration to prove the absence of a
13+
subset of undefined behaviors (e.g., out-of-bounds access, null and dangling
14+
pointer dereferences, and use of uninitialized memory) in the standard
15+
library.
16+
repository-code: https://github.com/model-checking/verify-rust-std
17+
url: https://model-checking.github.io/verify-rust-std/
18+
keywords:
19+
- rust
20+
- formal verification
21+
- model checking
22+
- program analysis
23+
- undefined behavior
24+
- standard library
25+
preferred-citation:
26+
type: conference-paper
27+
title: Verifying the Rust Standard Library
28+
authors:
29+
- given-names: Byron
30+
family-names: Cook
31+
- given-names: Remi
32+
family-names: Delmas
33+
- given-names: Zyad
34+
family-names: Hassan
35+
- given-names: Bart
36+
family-names: Jacobs
37+
- given-names: Ranjit
38+
family-names: Jhala
39+
- given-names: Rahul
40+
family-names: Kumar
41+
- given-names: Felipe R.
42+
family-names: Monteiro
43+
- given-names: Thanh
44+
family-names: Nguyen
45+
- given-names: Rebecca
46+
family-names: Rumbul
47+
- given-names: Michael
48+
family-names: Tautschnig
49+
- given-names: Celina
50+
family-names: Val
51+
- given-names: Carolyn
52+
family-names: Zech
53+
collection-title: >-
54+
NASA Formal Methods: 18th International Symposium, NFM 2026, Los Angeles, CA,
55+
USA, May 5–7, 2026, Proceedings
56+
collection-type: proceedings
57+
conference:
58+
name: 18th International Symposium on NASA Formal Methods (NFM 2026)
59+
city: Los Angeles
60+
region: CA
61+
country: US
62+
date-start: '2026-05-05'
63+
date-end: '2026-05-07'
64+
publisher:
65+
name: Springer-Verlag
66+
city: Berlin
67+
country: DE
68+
isbn: 978-3-032-28078-7
69+
year: 2026
70+
start: 415
71+
end: 435
72+
doi: 10.1007/978-3-032-28079-4_19
73+
url: https://doi.org/10.1007/978-3-032-28079-4_19

0 commit comments

Comments
 (0)