I am analysing a control program with the following structure:
unsigned int cnt=0;
unsigned int inc=3;
...
void main(){
int i;
int lim;
for(i=0;i<100000;i++)
{
f1();
....
lim = f2();
if(cnt < lim)
cnt += inc;
....
}
}
My aim is to analyse enough loop iterations to show that the cnt variable cannot overflow. Increasing the slevel alone will not help since the state space will get too high. I saw that the slevel can be adjusted for individual functions. Is this also possible for e.g. a single if/else construct? Increasing the slevel for a whole function can be already too much for such loop structures. Is there a way to prove the absence of an overflow without writing complex loop invariants and assertions?
BR, Harald