/* TAGS: c sym todo */ /* VERIFY_OPTS: --symbolic --sequential -o nofail:malloc */ // Source: Ken McMillan: "Lazy Abstraction With Interpolants", CAV 2006 extern void __VERIFIER_error(void); extern void __VERIFIER_assume(int); void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: __VERIFIER_error(); } return; } int __VERIFIER_nondet_int(); #define LARGE_INT 1000000 #include int main() { int n = __VERIFIER_nondet_int(); if (!(0 <= n && n <= 1000)) return 0; int *x = malloc(n * sizeof(int)); for (int i = 0; i < n; i++) x[i] = 0; for (int i = 0; i < n; i++) __VERIFIER_assert(x[i] == 0); return 0; }