Skip to content

Commit 5342996

Browse files
authored
Updates for front-page documentation (rust-lang#1138)
* Changes for `README.md` * Changes for getting-started * Rename "Workarounds" to "Working with CBMC" * Minor fixes in "Working with rustc" * Suggestions from code review * Place "working w rustc" after "working w CBMC" * Add suggestion and correct link * Remove "it" and capitalize Rust
1 parent 41462e3 commit 5342996

File tree

5 files changed

+26
-26
lines changed

5 files changed

+26
-26
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
The Kani Rust Verifier is a bit-precise model checker for Rust.
44

5+
Kani is particularly useful for verifying unsafe code in Rust, where many of the language's usual guarantees are no longer checked by the compiler.
56
Kani verifies:
6-
* Memory Safety -- even in unsafe Rust code
7-
* User-specified assertions
8-
* Absence of panics
9-
* Absence of some classes of undefined behavior
7+
* Memory safety (e.g., null pointer dereferences)
8+
* User-specified assertions (i.e., `assert!(...)`)
9+
* The absence of panics (e.g., `unwrap()` on `None` values)
10+
* The absence of some types of unexpected behavior (e.g., arithmetic overflows)
1011

1112
## Installation
1213

1314
Kani must currently be built from source. See [the installation guide](https://model-checking.github.io/kani/install-guide.html) for more details.
1415

15-
## How does Kani work?
16+
## How to use Kani
1617

17-
You write a _proof harness_ that looks a lot like a test harness, except that you can check all possible values using `kani::any()`:
18+
Similar to testing, you write a harness, but with Kani you can check all possible values using `kani::any()`:
1819

1920
```rust
2021
use my_crate::{function_under_test, is_valid, meets_specification};
@@ -35,7 +36,8 @@ fn check_my_property() {
3536
}
3637
```
3738

38-
Kani will then prove that all valid inputs produce acceptable outputs, without panicking or executing undefined behavior.
39+
Kani will then try to prove that all valid inputs produce acceptable outputs, without panicking or executing unexpected behavior.
40+
Otherwise Kani will generate a trace that points to the failure.
3941
We recommend following [the tutorial](https://model-checking.github.io/kani/kani-tutorial.html) to learn more about how to use Kani.
4042

4143
## Security

docs/src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
- [Where to start on real code](./tutorial-real-code.md)
1919

2020
- [Developer documentation](dev-documentation.md)
21-
- [Workarounds](./workarounds.md)
22-
- [Command cheat sheets](./cheat-sheets.md)
21+
- [Working with CBMC](./cbmc-hacks.md)
2322
- [Working with `rustc`](./rustc-hacks.md)
23+
- [Command cheat sheets](./cheat-sheets.md)
2424
- [Testing](./testing.md)
2525
- [Regression testing](./regression-testing.md)
2626
- [Book runner](./bookrunner.md)

docs/src/workarounds.md renamed to docs/src/cbmc-hacks.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
# Workarounds
1+
# Working with CBMC
22

3-
This section describes a few workarounds that may help overcome tooling
4-
issues in the Kani project.
3+
This section describes how to access more advanced CBMC options from Kani.
54

65
## CBMC arguments
76

docs/src/getting-started.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
# Getting started
22

3-
Kani is a Rust verification tool based on _model checking_. With Kani, you can
4-
ensure that wide classes of problems are absent from your Rust code by writing
5-
_proof harnesses_, which are broadly similar to tests (especially property
6-
tests).
3+
Kani is an open-source verification tool that uses automated reasoning to analyze Rust programs.
4+
Kani is particularly useful for verifying unsafe code in Rust, where many of the Rust’s usual guarantees are no longer checked by the compiler.
5+
Some example properties you can prove with Kani include memory safety properties (e.g., null pointer dereferences, use-after-free, etc.), the absence of certain runtime errors (i.e., panics), and the absence of some types of unexpected behavior (e.g., arithmetic overflows).
6+
Kani can also prove custom properties provided in the form of user-specified assertions.
77

8-
Kani is particularly useful for verifying unsafe code in Rust, where
9-
many of the language's usual guarantees can no longer be checked by the
10-
compiler. But it's also useful for finding panics and check user-defined
11-
assertions in safe Rust.
8+
Kani uses proof harnesses to analyze programs. Proof harnesses are similar to test harnesses, especially property-based test harnesses.
129

1310
## Project Status
1411

1512
Kani is currently under active development and has not made an official release yet.
16-
There is support for a fair amount of the Rust language features, but not all of them.
17-
If you encounter issues when using Kani we encourage you to [report them to us](https://github.com/model-checking/kani/issues/new/choose).
13+
There is support for a fair amount of Rust language features, but not all (e.g., concurrency).
14+
Please see [Limitations - Rust feature support](./rust-feature-support.md) for a detailed list of supported features.
1815

19-
Kani usually synchronizes with the main branch of Rust every two weeks, and so
20-
is generally up-to-date with the latest Rust language features.
16+
Kani usually synchronizes with the nightly release of Rust every two weeks, and so is generally up-to-date with the latest Rust language features.
17+
18+
If you encounter issues when using Kani, we encourage you to [report them to us](https://github.com/model-checking/kani/issues/new/choose).

docs/src/rustc-hacks.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# Working with `rustc`
2-
Kani is developed on the top of the rust compiler, which is not distributed on crates.io and it depends on
2+
3+
Kani is developed on the top of the Rust compiler, which is not distributed on [crates.io](https://crates.io/) and depends on
34
bootstrapping mechanisms to properly build its components.
45
Thus, our dependency on `rustc` crates are not declared in our `Cargo.toml`.
56

6-
Bellow are a few hacks that will make it easier to develop on the top of `rustc`.
7+
Below are a few hacks that will make it easier to develop on the top of `rustc`.
78

89
## Code analysis for `rustc` definitions
910

0 commit comments

Comments
 (0)