← Back to Report
● FULL ◐ PARTIAL ○ NONE
diamond_1-1.c
📄 tests/demo_test_files/diamond_1-1.c
1extern void abort(void);
2extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
3void reach_error() { __assert_fail("0", "diamond_1-1.c", 3, "reach_error"); }
4extern unsigned int __VERIFIER_nondet_uint(void);
5
6void __VERIFIER_assert(int cond) {
7 if (!(cond)) {◐PART
8 ERROR: {reach_error();abort();}
9 }
10 return;
11}
12
13int main(void) {
14 unsigned int x = 0;
15 unsigned int y = __VERIFIER_nondet_uint();
16
17 while (x < 99) {●FULL
18 if (y % 2 == 0) {◐PART
19 x += 2;
20 } else {
21 x++;
22 }
23 }
24
25 __VERIFIER_assert((x % 2) == (y % 2));
26}