forked from model-checking/kani
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Report results as UNDETERMINED instead of SUCCESS if an unwinding ass…
…ertion fails (model-checking#889)
- Loading branch information
1 parent
2346c30
commit 5562b55
Showing
4 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
UNDETERMINED | ||
[Kani] info: Verification output shows one or more unwinding failures. | ||
[Kani] tip: Consider increasing the unwinding value or disabling `--unwinding-assertions`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 OR MIT | ||
|
||
// This test checks that Kani reports UNDETERMINED if the specified unwinding is | ||
// insufficient. The minimum required unwinding is 7. | ||
|
||
// kani-flags: --unwind 6 | ||
|
||
fn main() { | ||
let x: bool = kani::any(); | ||
let v = if x { vec![1, 2, 3] } else { vec![1, 1, 1, 1, 1, 1] }; | ||
|
||
let mut sum = 0; | ||
for i in v { | ||
sum += i; | ||
} | ||
assert!(sum == 6); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
UNDETERMINED | ||
[Kani] info: Verification output shows one or more unwinding failures. | ||
[Kani] tip: Consider increasing the unwinding value or disabling `--unwinding-assertions`. |