File: loop-3.c

package info (click to toggle)
ikos 3.5-2
  • links: PTS, VCS
  • area: non-free
  • in suites: sid
  • size: 11,896 kB
  • sloc: cpp: 102,890; python: 6,471; ansic: 5,860; sh: 2,409; javascript: 348; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 268 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
extern void __ikos_assert(int);
extern int __ikos_nondet_int(void);

int main() {
  int x = 0;
  int y = 0;
  while (x < 100) {
    if (__ikos_nondet_int())
      y = 1;
    x = x + 4;
  }

  __ikos_assert(y >= 0 && y <= 1);
  __ikos_assert(x <= 103);

  return 42;
}