Skip to content

Commit 657ddda

Browse files
committed
Merge remote-tracking branch 'origin/main' into issue-2113-toolchain
Conflicts: - kani-compiler/src/kani_middle/stubbing/annotations.rs - kani-compiler/src/session.rs (logger initialization issue)
2 parents c5db1df + bf5e697 commit 657ddda

File tree

221 files changed

+6221
-1890
lines changed

Some content is hidden

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

221 files changed

+6221
-1890
lines changed

.cargo/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Command aliases
55
[alias]
66
# Build kani with development configuration.
7-
build-dev = "run -p build-kani -- build-dev"
7+
build-dev = "run --target-dir target/tools -p build-kani -- build-dev"
88
# Build kani release bundle.
99
bundle = "run -p build-kani -- bundle"
1010

.github/actions/setup/action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@ inputs:
55
os:
66
description: In which Operating System is this running
77
required: true
8-
install_cbmc:
9-
description: Whether to install CBMC
8+
kani_dir:
9+
description: Path to Kani's root directory
1010
required: false
11-
default: 'true'
11+
default: '.'
1212
runs:
1313
using: composite
1414
steps:
1515
- name: Install dependencies
16-
run: ./scripts/setup/${{ inputs.os }}/install_deps.sh
16+
run: cd ${{ inputs.kani_dir }} && ./scripts/setup/${{ inputs.os }}/install_deps.sh
1717
shell: bash
1818

1919
- name: Install Rust toolchain
20-
run: ./scripts/setup/install_rustup.sh
20+
run: cd ${{ inputs.kani_dir }} && ./scripts/setup/install_rustup.sh
2121
shell: bash
2222

2323
- name: Update submodules
2424
run: |
25-
git submodule update --init --depth 1
25+
cd ${{ inputs.kani_dir }} && git submodule update --init --depth 1
2626
shell: bash

.github/workflows/cbmc-latest.yml

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,67 +21,71 @@ jobs:
2121
matrix:
2222
os: [macos-11, ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
2323
steps:
24-
- name: Checkout CBMC under "cbmc"
24+
- name: Checkout Kani under "kani"
2525
uses: actions/checkout@v3
2626
with:
27-
repository: diffblue/cbmc
28-
path: cbmc
29-
30-
- name: Build CBMC
31-
run: |
32-
cd cbmc
33-
cmake -S . -Bbuild -DWITH_JBMC=OFF
34-
cmake --build build -- -j 4
35-
sudo cmake --build build --target install
36-
# Cleanup cbmc directory
37-
cd ..
38-
rm -rf cbmc
39-
40-
- name: Checkout Kani
41-
uses: actions/checkout@v3
27+
path: kani
4228

4329
- name: Setup Kani Dependencies
44-
uses: ./.github/actions/setup
30+
uses: ./kani/.github/actions/setup
4531
with:
4632
os: ${{ matrix.os }}
47-
install_cbmc: 'false'
33+
kani_dir: 'kani'
4834

4935
- name: Build Kani
36+
working-directory: ./kani
5037
run: cargo build-dev
5138

52-
- name: Execute Kani regressions
53-
run: ./scripts/kani-regression.sh
54-
55-
perf:
56-
runs-on: ubuntu-20.04
57-
steps:
5839
- name: Checkout CBMC under "cbmc"
5940
uses: actions/checkout@v3
6041
with:
6142
repository: diffblue/cbmc
6243
path: cbmc
6344

6445
- name: Build CBMC
46+
working-directory: ./cbmc
6547
run: |
66-
cd cbmc
67-
cmake -S . -Bbuild -DWITH_JBMC=OFF
68-
cmake --build build -- -j 4
69-
sudo cmake --build build --target install
70-
# Cleanup cbmc directory
71-
cd ..
72-
rm -rf cbmc
48+
make -C src minisat2-download cadical-download
49+
make -C src -j4 MINISAT2=../../minisat-2.2.1 CADICAL=../../cadical
50+
# Prepend the bin directory to $PATH
51+
echo "${GITHUB_WORKSPACE}/cbmc/build/bin" >> $GITHUB_PATH
7352
74-
- name: Checkout Kani
53+
- name: Execute Kani regressions
54+
working-directory: ./kani
55+
run: ./scripts/kani-regression.sh
56+
57+
perf:
58+
runs-on: ubuntu-20.04
59+
steps:
60+
- name: Checkout Kani under "kani"
7561
uses: actions/checkout@v3
62+
with:
63+
path: kani
7664

7765
- name: Setup Kani Dependencies
78-
uses: ./.github/actions/setup
66+
uses: ./kani/.github/actions/setup
7967
with:
8068
os: ubuntu-20.04
81-
install_cbmc: 'false'
69+
kani_dir: 'kani'
8270

8371
- name: Build Kani using release mode
72+
working-directory: ./kani
8473
run: cargo build-dev -- --release
8574

75+
- name: Checkout CBMC under "cbmc"
76+
uses: actions/checkout@v3
77+
with:
78+
repository: diffblue/cbmc
79+
path: cbmc
80+
81+
- name: Build CBMC
82+
working-directory: ./cbmc
83+
run: |
84+
cmake -S . -Bbuild -DWITH_JBMC=OFF
85+
cmake --build build -- -j 4
86+
# Prepend the bin directory to $PATH
87+
echo "${GITHUB_WORKSPACE}/cbmc/build/bin" >> $GITHUB_PATH
88+
8689
- name: Execute Kani performance tests
90+
working-directory: ./kani
8791
run: ./scripts/kani-perf.sh

.github/workflows/kani.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,25 @@ jobs:
3333
- name: Execute Kani regression
3434
run: ./scripts/kani-regression.sh
3535

36+
write-json-symtab-regression:
37+
runs-on: ubuntu-20.04
38+
steps:
39+
- name: Checkout Kani
40+
uses: actions/checkout@v3
41+
42+
- name: Setup Kani Dependencies
43+
uses: ./.github/actions/setup
44+
with:
45+
os: ubuntu-20.04
46+
47+
- name: Build Kani
48+
run: cargo build-dev
49+
50+
- name: Execute Kani regression
51+
env:
52+
KANI_ENABLE_WRITE_JSON_SYMTAB: 1
53+
run: ./scripts/kani-regression.sh
54+
3655
experimental-features-regression:
3756
runs-on: ubuntu-20.04
3857
env:

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Changelog
2+
3+
This file contains notable changes (e.g. breaking changes, major changes, etc.) in Kani releases.
4+
5+
This file was introduced starting Kani 0.23.0, so it only contains changes from version 0.23.0 onwards.
6+
7+
## [0.23.0]
8+
9+
### Breaking Changes
10+
11+
- Remove the second parameter in the `kani::any_where` function by @zhassan-aws in #2257
12+
We removed the second parameter in the `kani::any_where` function (`_msg: &'static str`) to make the function more ergonomic to use.
13+
We suggest moving the explanation for why the assumption is introduced into a comment.
14+
For example, the following code:
15+
```rust
16+
let len: usize = kani::any_where(|x| *x < 5, "Restrict the length to a value less than 5");
17+
```
18+
should be replaced by:
19+
```rust
20+
// Restrict the length to a value less than 5
21+
let len: usize = kani::any_where(|x| *x < 5);
22+
```
23+
24+
### Major Changes
25+
26+
- Enable the build cache to avoid recompiling crates that haven't changed, and introduce `--force-build` option to compile all crates from scratch by @celinval in #2232.

0 commit comments

Comments
 (0)