Showing error 1521

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: loops/terminator_02_safe.i
Line in file: 4
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

 1extern void __VERIFIER_assume(int);
 2void __VERIFIER_assert(int cond) {
 3  if (!(cond)) {
 4    ERROR: goto ERROR;
 5  }
 6  return;
 7}
 8int __VERIFIER_nondet_int();
 9_Bool __VERIFIER_nondet_bool();
10
11main()
12{
13  int x=__VERIFIER_nondet_int();
14  int y=__VERIFIER_nondet_int();
15  int z=__VERIFIER_nondet_int();
16  __VERIFIER_assume(x<100);
17  __VERIFIER_assume(z<100);
18  while(x<100 && 100<z)
19  {
20    _Bool tmp=__VERIFIER_nondet_bool();
21    if (tmp)
22   {
23     x++;
24   }
25   else
26   {
27     x--;
28     z--;
29   }
30  }
31
32  __VERIFIER_assert(x>=100 || z<=100);
33}