You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Kani provides a [`kani::cover`](https://model-checking.github.io/kani/crates/doc/kani/macro.cover.html) macro that can be used for checking whether a condition may occur at a certain point in the code.
101
+
102
+
The result of a cover property can be one of the following:
103
+
104
+
1.`SATISFIED`: This indicates that Kani found an execution that triggers the specified condition.
105
+
106
+
The following example uses `kani::cover` to check if it's possible for `x` and `y` to hold the values 24 and 72, respectively, after 3 iterations of the `while` loop, which turns out to be the case.
- Description: "cover condition: i > 2 && x == 24 && y == 72"
115
+
- Location: src/main.rs:60:9 in function cover_satisfied_example
116
+
```
117
+
118
+
2.`UNSATISFIABLE`: This indicates that Kani _proved_ that the specified condition is impossible.
119
+
120
+
The following example uses `kani::cover` to check if it's possible to have a UTF-8 encoded string consisting of 5 bytes that correspond to a string with a single character.
- Location: src/main.rs:75:9 in function cover_unsatisfiable_example
130
+
```
131
+
132
+
3.`UNREACHABLE`: This indicates that the `cover` property itself is unreachable (i.e. it is _vacuously_ unsatisfiable).
133
+
134
+
In contrast to an `UNREACHABLE` result for assertions, an unreachable (or an unsatisfiable) cover property may indicate an incomplete proof.
135
+
136
+
Example:
137
+
In this example, a `kani::cover` call is unreachable because if the outer `if` condition holds, then the non-empty range `r2` is strictly larger than the non-empty range `r1`, in which case, the condition in the inner `if` condition is impossible.
- Location: src/main.rs:90:13 in function cover_unreachable_example
146
+
```
147
+
148
+
4.`UNDETERMINED`: This is the same as the `UNDETERMINED` result for normal checks (see [check_results]).
149
+
150
+
## Verification summary
151
+
152
+
Kani reports a summary at the end of the verification report, which includes the overall results of all checks, the overall results of cover properties (if the package includes cover properties), and the overall verification result, e.g.:
0 commit comments