-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The assignment originated from a PHI value should be always inserted after the assume inserted by execEdge. This fixes issue #94. Note that this commit reverts commit cbab732. Unfortunately, I do not remember the reason for that commit and it did not include any test case.
- Loading branch information
Showing
2 changed files
with
20 additions
and
7 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,16 @@ | ||
// RUN: %clam --crab-dom=zones --crab-check=assert "%s" 2>&1 | OutputCheck -l debug %s | ||
// CHECK: ^0 Number of total safe checks$ | ||
// CHECK: ^0 Number of total error checks$ | ||
// CHECK: ^1 Number of total warning checks$ | ||
|
||
extern void __VERIFIER_assume(int); | ||
extern void __CRAB_assert(int); | ||
extern int __VERIFIER_nondet_int(void); | ||
|
||
int main() { | ||
const int MAX = __VERIFIER_nondet_int(); | ||
__VERIFIER_assume(MAX <= 1); | ||
for (int i = MAX - 1; i >= 0; i--) { | ||
} | ||
__CRAB_assert(MAX <= 0); | ||
} |