Open
Description
Assuming an assertion to prevent detecting assertion violations that violate 'previous' assertions on the same path (aka dependent properties) has subtle interactions with the assumptions added to perform k-induction proofs.
Example:
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
void __VERIFIER_assert(int cond) { if(!(cond)) { ERROR: __VERIFIER_error(); } }
#define SIZE 2
int main ( ) {
int a[SIZE];
int i = 0;
while ( i < SIZE ) {
a[i] = 42;
i = i + 1;
}
int x;
for ( x = 0 ; x < SIZE ; x++ ) {
__VERIFIER_assert(a[x] == 43);
}
return 0;
}