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
Copy file name to clipboardExpand all lines: docs/src/tutorial-first-steps.md
+12-11Lines changed: 12 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,10 @@ Kani is unlike the testing tools you may already be familiar with.
4
4
Much of testing is concerned with thinking of new corner cases that need to be covered.
5
5
With Kani, all the corner cases are covered from the start, and the new concern is narrowing down the scope to something manageable for the checker.
6
6
7
-
Consider this first program (which can be found under [`kani-first-steps`](https://github.com/model-checking/kani/tree/main/docs/src/tutorial/kani-first-steps/)):
7
+
Consider this first program (which can be found under [`first-steps-v1`](https://github.com/model-checking/kani/tree/main/docs/src/tutorial/first-steps-v1/)):
Think about the test harness you would need to write to test this function.
@@ -18,7 +18,7 @@ And if this function was more complicated—for example, if some of the branches
18
18
We can try to property test a function like this, but if we're naive about it (and consider all possible `u32` inputs), then it's unlikely we'll ever find the bug.
@@ -60,10 +60,10 @@ Here, we've just got some nondeterministic inputs up front, but that's something
60
60
To see traces, run:
61
61
62
62
```
63
-
kani --visualize src/lib.rs
63
+
kani --visualize src/main.rs
64
64
```
65
65
66
-
This command runs Kani and generates the HTML report in `report/html/index.html`.
66
+
This command runs Kani and generates the HTML report in `report-main/html/index.html`.
67
67
Open the report with your preferred browser.
68
68
From this report, we can find the trace of the failure and filter through it to find the relevant line (at present time, an unfortunate amount of generated code is present in the trace):
69
69
@@ -143,10 +143,11 @@ VERIFICATION:- FAILED
143
143
## Assertions, Assumptions, and Harnesses
144
144
145
145
It seems a bit odd that we can take billions of inputs when our function only handles up to a few thousand.
146
-
Let's encode this fact about our function by asserting some reasonable bound on our input, after we've fixed our bug:
146
+
Let's encode this fact about our function by asserting some reasonable bound on our input, after we've fixed our bug (code available under
0 commit comments