Skip to content

Commit d6775ff

Browse files
github-actions[bot]yashaggarwal85dcalebzulawskiThe rustc-josh-sync Cronjob Botjhpratt
authored
Merge subtree update for toolchain nightly-2026-11-12 (#766)
This is an automated PR to merge library subtree updates from 2026-10-23 (rust-lang/rust@7189d39) to 2026-11-12 (rust-lang/rust@3ef0c22) (inclusive) into main. `git merge` resulted in conflicts, which require manual resolution. Files were commited with merge conflict markers. **Do not remove or edit the following annotations:** git-subtree-dir: library git-subtree-split: 5a2d852 --- Kani is pinned to `53cb531`: the x87_f80 fix (model-checking/kani#5197) on top of `faffcee3`, kept on nightly-2026-11-12. The ESBMC job runs without Kani's reachability checks until esbmc/esbmc#10875 is resolved. --------- Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com> Signed-off-by: Hardik Kumar <hardikxk@gmail.com> Signed-off-by: Ayush Singh <ayush@beagleboard.org> Co-authored-by: Yash Aggarwal <68061195+yashaggarwal85d@users.noreply.github.com> Co-authored-by: Caleb Zulawski <caleb.zulawski@gmail.com> Co-authored-by: The rustc-josh-sync Cronjob Bot <github-actions@github.com> Co-authored-by: Jacob Pratt <jacob@jhpratt.dev> Co-authored-by: Web4everyone32 <oveyjval1@gmail.com> Co-authored-by: panstromek <panstromek@seznam.cz> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: bors <bors@rust-lang.org> Co-authored-by: Mend Renovate <bot@renovateapp.com> Co-authored-by: Jonathan Brouwer <jonathantbrouwer@gmail.com> Co-authored-by: arvindkhoisnam <khoisnamarvind@gmail.com> Co-authored-by: Mikolaj Wielgus <wielgusmikolaj@gmail.com> Co-authored-by: Trevor Gross <tg@trevorgross.com> Co-authored-by: Hugo Sanz González <80487270+hsanzg@users.noreply.github.com> Co-authored-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com> Co-authored-by: Yilin Chen <1479826151@qq.com> Co-authored-by: Guillaume Gomez <contact@guillaume-gomez.fr> Co-authored-by: Thalia Archibald <thalia@archibald.dev> Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> Co-authored-by: Nag <nagendrabhatkrkl@gmail.com> Co-authored-by: Max Dexheimer <maxdexh03@gmail.com> Co-authored-by: asquared31415 <34665709+asquared31415@users.noreply.github.com> Co-authored-by: Chris Denton <chris@chrisdenton.dev> Co-authored-by: The Miri Cronjob Bot <miri@cron.bot> Co-authored-by: Frank King <frankking1729@gmail.com> Co-authored-by: Jules Bertholet <jules.bertholet@gmail.com> Co-authored-by: malezjaa <poreba.kris@gmail.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Co-authored-by: Michael Howell <michael@notriddle.com> Co-authored-by: Voxell Paladynee <paladyneshadow@gmail.com> Co-authored-by: xtqqczze <45661989+xtqqczze@users.noreply.github.com> Co-authored-by: Mahdi Ali-Raihan <asder8215@gmail.com> Co-authored-by: Daniel Scherzer <daniel.e.scherzer@gmail.com> Co-authored-by: Valaphee64.exe <iam@valaphee.com> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Folkert de Vries <folkert@folkertdev.nl> Co-authored-by: Tim (Theemathas Chirananthavat) <theemathas@gmail.com> Co-authored-by: Xing Xue <xingxue@outlook.com> Co-authored-by: mejrs <59372212+mejrs@users.noreply.github.com> Co-authored-by: Jana Dönszelmann <jana@donsz.nl> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Co-authored-by: Joy <soniqjjj@gmail.com> Co-authored-by: Zac Harrold <zac@harrold.com.au> Co-authored-by: Marius Melzer <marius.melzer@kernkonzept.com> Co-authored-by: krokodeyu <1146060340@qq.com> Co-authored-by: Beat Küng <beat-kueng@gmx.net> Co-authored-by: yhx-12243 <yhx12243@gmail.com> Co-authored-by: waffle <wffl+16@riseup.net> Co-authored-by: Toni Peter <mail@tonipeter.de> Co-authored-by: Zalathar <Zalathar@users.noreply.github.com> Co-authored-by: zannabianca1997 <zannabianca199712@gmail.com> Co-authored-by: Hardik Kumar <hardikxk@gmail.com> Co-authored-by: lazerg <lazerg2@gmail.com> Co-authored-by: Ayush Singh <ayush@beagleboard.org> Co-authored-by: Lewis McClelland <lewis@lewismcclelland.me> Co-authored-by: Dennis Duda <git@seri.tools> Co-authored-by: Nicole LeGare <legaren@immunant.com> Co-authored-by: Pavel Grigorenko <GrigorenkoPV@ya.ru> Co-authored-by: Shun Sakai <sorairolake@protonmail.ch> Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de> Co-authored-by: Vlad Mashkautsan <47895995+vladmashk@users.noreply.github.com> Co-authored-by: Joseph Zhao <zhaozihan542259545@gmail.com> Co-authored-by: Joseph Zhao <65984904+programskillforverification@users.noreply.github.com> Co-authored-by: gitbot <git@bot> Co-authored-by: Felipe R. Monteiro <rms.felipe@gmail.com> Co-authored-by: Lucas C. Cordeiro <lucasccordeiro@gmail.com>
1 parent a43ef3d commit d6775ff

348 files changed

Lines changed: 10503 additions & 5381 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/copilot-instructions.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This repository is a fork of the Rust standard library used exclusively for form
66

77
## Approved Verification Tools
88

9-
Only these tools are accepted: **Kani**, **VeriFast**, **Flux**, and **ESBMC (GOTO-Transcoder)**. Flag any PR that uses a tool not on this list — it must go through a separate tool application process first.
9+
Only these tools are accepted: **Kani**, **VeriFast**, **Flux**, and **ESBMC**. Flag any PR that uses a tool not on this list — it must go through a separate tool application process first.
1010

1111
---
1212

@@ -33,7 +33,7 @@ These PRs solve open verification challenges. Apply the strictest review criteri
3333
- **No unjustified assumptions.** Every `#[kani::assume]`, `requires`, or equivalent precondition must be justified by the function's documented safety contract or API invariants. Flag assumptions that over-constrain inputs to make verification pass.
3434
- **Contracts must reflect documented safety conditions.** Cross-reference preconditions and postconditions against the function's `# Safety` doc comments and the [official std library documentation](https://doc.rust-lang.org/std/).
3535
- **Harnesses must cover meaningful input ranges**, not just trivial or degenerate cases.
36-
- **Verification must actually run in CI** using one of the approved tools. Check that the relevant workflow (kani.yml, verifast.yml, flux.yml, goto-transcoder.yml) executes the new proofs.
36+
- **Verification must actually run in CI** using one of the approved tools. Check that the relevant workflow (kani.yml, verifast.yml, flux.yml, esbmc.yml) executes the new proofs.
3737

3838
### Code Quality for the Rust Standard Library
3939
- Code should be **idiomatic Rust** and match the style of the surrounding standard library code.
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# This workflow executes the supported contracts in goto-transcoder
1+
# This workflow checks the supported contracts with ESBMC
22

3-
name: Run GOTO Transcoder (ESBMC)
3+
name: Run ESBMC
44
on:
55
workflow_dispatch:
66
merge_group:
@@ -9,17 +9,17 @@ on:
99
push:
1010
paths:
1111
- 'library/**'
12-
- '.github/workflows/goto-transcoder.yml'
12+
- '.github/workflows/esbmc.yml'
1313
- 'scripts/run-kani.sh'
14-
- 'scripts/run-goto-transcoder.sh'
14+
- 'scripts/run-esbmc.sh'
1515

1616
defaults:
1717
run:
1818
shell: bash
1919

2020
jobs:
2121
verify-rust-std:
22-
name: Verify contracts with goto-transcoder
22+
name: Verify contracts with ESBMC
2323
runs-on: ubuntu-24.04
2424
steps:
2525
# Step 1: Check out the repository
@@ -32,6 +32,6 @@ jobs:
3232
- name: Generate contracts
3333
run: ./scripts/run-kani.sh --kani-args --keep-temps --only-codegen --target-dir kani/contracts
3434

35-
# Step 3: Run goto-transcoder
36-
- name: Run goto-transcoder
37-
run: ./scripts/run-goto-transcoder.sh kani/contracts checked_unchecked.*.out
35+
# Step 3: Run ESBMC on the GOTO binaries Kani generated
36+
- name: Run ESBMC
37+
run: ./scripts/run-esbmc.sh kani/contracts checked_unchecked.*.out

‎.github/workflows/flux.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
branches: [main]
99

1010
env:
11-
FLUX_VERSION: "1b04d5e6f8247766cfb0f9c6040c2944eb9c87c4"
11+
FLUX_VERSION: "0301038641e330c133a237d66bb95a6f214058c4"
1212
FIXPOINT_VERSION: "nightly"
1313

1414
jobs:

‎README.md‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repository is a fork of the official Rust programming
88
language repository, created solely to verify the Rust standard
99
library. It should not be used as an alternative to the official
1010
Rust releases. The repository is tool agnostic and welcomes the addition of
11-
new tools. The currently accepted tools are [Flux](https://model-checking.github.io/verify-rust-std/tools/flux.html), [GOTO Transcoder (ESBMC)](https://model-checking.github.io/verify-rust-std/tools/goto-transcoder.html), [Kani](https://model-checking.github.io/verify-rust-std/tools/kani.html), [KMIR](https://model-checking.github.io/verify-rust-std/tools/kmir.html), and [VeriFast](https://model-checking.github.io/verify-rust-std/tools/verifast.html).
11+
new tools. The currently accepted tools are [Flux](https://model-checking.github.io/verify-rust-std/tools/flux.html), [ESBMC](https://model-checking.github.io/verify-rust-std/tools/esbmc.html), [Kani](https://model-checking.github.io/verify-rust-std/tools/kani.html), [KMIR](https://model-checking.github.io/verify-rust-std/tools/kmir.html), and [VeriFast](https://model-checking.github.io/verify-rust-std/tools/verifast.html).
1212

1313
The goal is to have a verified [Rust standard library](https://doc.rust-lang.org/std/) and prove that it is safe.
1414
1. Contributing to the core mechanism of verifying the rust standard library
@@ -106,10 +106,7 @@ See [SECURITY](https://github.com/model-checking/kani/security/policy) for more
106106
Kani is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
107107
See [LICENSE-APACHE](https://github.com/model-checking/kani/blob/main/LICENSE-APACHE) and [LICENSE-MIT](https://github.com/model-checking/kani/blob/main/LICENSE-MIT) for details.
108108

109-
### GOTO Transcoder (ESBMC)
110-
The [goto-transcoder](https://github.com/rafaelsamenezes/goto-transcoder) is distributed under the terms of the MIT license.
111-
See [LICENSE](https://github.com/rafaelsamenezes/goto-transcoder/blob/main/LICENSE) for details.
112-
109+
### ESBMC
113110
[ESBMC](https://github.com/esbmc/esbmc) is distributed under the terms of the Apache License (Version 2.0).
114111
See [COPYING](https://github.com/esbmc/esbmc/blob/master/COPYING) for details.
115112

‎doc/book.toml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ git-repository-url = "https://github.com/model-checking/verify-rust-std"
1414
edit-url-template = "https://github.com/model-checking/verify-rust-std/edit/main/doc/{path}"
1515
no-section-label = true
1616

17+
[output.html.redirect]
18+
"/tools/goto-transcoder.html" = "esbmc.html"
19+
1720
[output.html.playground]
1821
runnable = false
1922

‎doc/src/SUMMARY.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
- [Verification Tools](./tools.md)
1010
- [Kani](./tools/kani.md)
11-
- [GOTO Transcoder](./tools/goto-transcoder.md)
11+
- [ESBMC](./tools/esbmc.md)
1212
- [VeriFast](./tools/verifast.md)
1313
- [Flux](./tools/flux.md)
1414
- [KMIR](./tools/kmir.md)

‎doc/src/tools.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ please see the [Tool Application](general-rules.md#tool-applications) section.
1111

1212
| Tool | CI Status |
1313
|---------------------|-------|
14-
| ESBMC (GOTO-Transcoder) | [![ESBMC](https://github.com/model-checking/verify-rust-std/actions/workflows/goto-transcoder.yml/badge.svg)](https://github.com/model-checking/verify-rust-std/actions/workflows/goto-transcoder.yml) |
14+
| ESBMC | [![ESBMC](https://github.com/model-checking/verify-rust-std/actions/workflows/esbmc.yml/badge.svg)](https://github.com/model-checking/verify-rust-std/actions/workflows/esbmc.yml) |
1515
| Flux | [![Flux](https://github.com/model-checking/verify-rust-std/actions/workflows/flux.yml/badge.svg)](https://github.com/model-checking/verify-rust-std/actions/workflows/flux.yml) |
1616
| Kani Rust Verifier | [![Kani](https://github.com/model-checking/verify-rust-std/actions/workflows/kani.yml/badge.svg)](https://github.com/model-checking/verify-rust-std/actions/workflows/kani.yml) |
1717
| KMIR Symbolic Rust Execution | [![KMIR](https://github.com/model-checking/verify-rust-std/actions/workflows/kmir.yml/badge.svg)](https://github.com/model-checking/verify-rust-std/actions/workflows/kmir.yml) |

‎doc/src/tools/esbmc.md‎

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# ESBMC
2+
3+
[ESBMC](https://github.com/esbmc/esbmc) is an SMT-based bounded model checker. It reads the GOTO programs that Kani generates
4+
directly: since [v8.4](https://github.com/esbmc/esbmc/pull/5291), `esbmc --binary` accepts a CBMC GOTO binary, so no conversion
5+
step sits between Kani and ESBMC. ESBMC has a few differences to CBMC, including:
6+
- CBMC focuses on SAT-based encodings of unrolled programs, while ESBMC targets SMT-based encodings. The SMT support of ESBMC includes sending the full formula or using incremental-SMT.
7+
- CBMC's concurrency support is an entirely symbolic encoding of a concurrent program in one SAT formula, while ESBMC explores each interleaving individually using context-bounded verification.
8+
- ESBMC implements incremental-BMC and k-induction strategies.
9+
10+
To install ESBMC, download `esbmc-linux.zip` from the [v8.7 release](https://github.com/esbmc/esbmc/releases/tag/v8.7) and unpack it;
11+
the binary is `release/bin/esbmc`. CI uses the same release.
12+
13+
ESBMC also depends on Kani to generate the GOTO files. You can find more information about how to install it in [the installation section of the Kani book](https://model-checking.github.io/kani/install-guide.html).
14+
15+
# Steps to Use the Tool
16+
17+
For these steps let's verify a Rust hello world, we will assume that you have Kani available in your system. We will start with
18+
the Hello World from the [Kani tutorial](https://model-checking.github.io/kani/kani-tutorial.html):
19+
20+
```rust
21+
// File: test.rs
22+
#[kani::proof]
23+
fn main() {
24+
assert!(1 == 2);
25+
}
26+
```
27+
28+
## Use Kani to generate the CBMC GOTO program
29+
30+
Invoke Kani and ask it to keep the intermediate files: `kani test.rs --keep-temps`. This writes one `.out` file per harness in
31+
CBMC's GOTO binary format, here `test__RNvCsjN3sjT3oKaE_4test4main.out`. The `_RNv...` part of the file name is the harness's
32+
entry point. Ignore the `.symtab.out` file next to it.
33+
34+
## Invoke ESBMC
35+
36+
Pass the `.out` file and its entry point to ESBMC:
37+
38+
```
39+
esbmc --binary test__RNvCsjN3sjT3oKaE_4test4main.out --function _RNvCsjN3sjT3oKaE_4test4main \
40+
--ignore-property-class reachability_check --ignore-property-class cover
41+
```
42+
43+
```
44+
CBMC goto-binary detected: linking ESBMC additions automatically
45+
[...]
46+
Solving with solver Bitwuzla 0.9.0
47+
Runtime decision procedure: 0.013s
48+
Building error trace
49+
50+
[Counterexample]
51+
52+
53+
State 1 file test.rs line 4 column 5 function main thread 0
54+
----------------------------------------------------
55+
Violated property:
56+
file test.rs line 4 column 5 function main
57+
[KANI_CHECK_ID_test.e685462a24097d9e::test_0] assertion failed: 1 == 2
58+
var_2 != 0
59+
60+
[...]
61+
VERIFICATION FAILED
62+
```
63+
64+
Kani also emits `reachability_check` and `cover` properties, which fail when the check is reachable or the condition is
65+
satisfiable; Kani reads those results itself rather than as bugs. The two `--ignore-property-class` options keep ESBMC from
66+
reporting them as violations.
67+
68+
## Using ESBMC to verify the Rust Standard Library
69+
70+
1. Follow the same procedure for Kani to add new properties.
71+
2. Run Kani with the following extra args: `--keep-temps --only-codegen`.
72+
3. You can then run ESBMC on each contract individually, as above.
73+
74+
In CI, [`scripts/run-esbmc.sh`](https://github.com/model-checking/verify-rust-std/blob/main/scripts/run-esbmc.sh) runs these
75+
steps on the contracts that the [ESBMC workflow](https://github.com/model-checking/verify-rust-std/blob/main/.github/workflows/esbmc.yml) selects.

‎doc/src/tools/goto-transcoder.md‎

Lines changed: 0 additions & 85 deletions
This file was deleted.

‎doc/src/tools/kmir.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,13 @@ for full license details.
164164

165165
## Comparison to Other Approved Tools
166166
The other tools approved at the time of writing are Kani, Verifast, and
167-
Goto-transcoder (ESBMC).
167+
ESBMC.
168168

169169
- **Verification Backend:** KMIR primarily differs from all of these tools by
170170
utilizing a unique verification backend through the K framework and
171171
reachability logic (as explained in the description above). KMIR has little
172172
dependence on an SAT solver or SMT solver. Kani's CBMC backend and
173-
Goto-transcoder (ESBMC) encode the verification problem into an SAT / SMT
173+
ESBMC encode the verification problem into an SAT / SMT
174174
verification condition to be discharged by the appropriate solver. Kani
175175
recently added a Lean backend through Aeneas, however Lean does not support
176176
matching or reachability logic currently. Verifast performs symbolic

0 commit comments

Comments
 (0)