Open
Description
When __CPROVER_assume
and __CPROVER_forall
are used together, it may simply not work. Let us consider the following program, namely main.c
.
#include <assert.h>
int main()
{
unsigned x[5];
__CPROVER_assume(__CPROVER_forall { int i; (i>=0 && i<5) ==> x[i]>=1 });
assert(x[0]>0);
return 0;
}
If we try to apply cbmc
on it: cbmc main.c
, we will get
warning: ignoring forall
and the assertion _fails_.
On the other hand, if we we replace assert(x[0]>0)
with the trivial assertion assert(1)
, then, together with the VERIFICATION SUCCESSFUL, there will be _no warning_.