/* TAGS: c sym */ /* VERIFY_OPTS: --symbolic --sequential -o nofail:malloc */ /* CC_OPTS: */ // V: v.10 CC_OPT: -DSIZE=10 // V: v.100 CC_OPT: -DSIZE=100 TAGS: big // V: v.1000 CC_OPT: -DSIZE=1000 TAGS: big // V: v.10000 CC_OPT: -DSIZE=10000 TAGS: big // V: v.100000 CC_OPT: -DSIZE=100000 TAGS: big extern void __VERIFIER_error() __attribute__ ((__noreturn__)); void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } } extern int __VERIFIER_nondet_int(void); int main() { int i; int a[SIZE]; int b[SIZE]; int c[SIZE]; //init and update for (i = 0; i < SIZE; i++) { int q = __VERIFIER_nondet_int(); a[i] = 0; if (q == 0) { a[i] = 1; b[i] = i % 2; } if (a[i] != 0) { if (b[i] == 0) { c[i] = 0; } else { c[i] = 1; } } } a[SIZE/2] = 1; for (i = 0; i < SIZE; i++) { if (i == SIZE/2) { __VERIFIER_assert(c[i] == 0); /* ERROR */ } } return 0; }