// S : tags error c sym todo $TAGS // S : expect --result error --location-comment ERROR // S : cc -o test.bc $CC_OPT $file // S : verify --symbolic --solver $solver --sequential -o nofail:malloc $V_OPT test.bc /* Benchmark used to verify Chimdyalwar, Bharti, et al. "VeriAbs: Verification by abstraction (competition contribution)." International Conference on Tools and Algorithms for the Construction and Analysis of Systems. Springer, Berlin, Heidelberg, 2017.*/ #define SIZE 10000 extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern void __VERIFIER_assume(int); void __VERIFIER_assert(int cond) { if (!(cond)) { ERROR: __VERIFIER_error(); } return; } unsigned int __VERIFIER_nondet_uint(); int main() { unsigned int array[SIZE]; unsigned int index = 0; unsigned int tmp = 0; while (1) { index = __VERIFIER_nondet_uint(); if (index >= SIZE) { break; } array[index] = index; tmp = index; } __VERIFIER_assert(tmp < SIZE && array[tmp] == tmp); /* ERROR */ }