Skip to content

Commit

Permalink
Small adjustments (part 2) (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
adpaco-aws authored May 4, 2022
1 parent e3af7d2 commit f719b56
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ See [the installation guide](https://model-checking.github.io/kani/install-guide
Similar to testing, you write a harness, but with Kani you can check all possible values using `kani::any()`:

```rust
use my_crate::{function_under_test, meets_specification};
use my_crate::{function_under_test, meets_specification, precondition};

#[kani::proof]
fn check_my_property() {
// Create a nondeterministic input
let input = kani::any();

// Constrain it according to the function's precondition
kani::assume(precondition(input));

// Call the function under verification
let output = function_under_test(input);

Expand Down

0 comments on commit f719b56

Please sign in to comment.