# Frama-C-discuss mailing list archives

This page gathers the archives of the old Frama-C-discuss archives, that was hosted by Inria's gforge before its demise at the end of 2020. To search for mails newer than September 2020, please visit the page of the new mailing list on Renater.

# [Frama-c-discuss] Value analysis and termination

• Subject: [Frama-c-discuss] Value analysis and termination
• From: hollas at informatik.htw-dresden.de (Boris Hollas)
• Date: Mon, 11 Oct 2010 20:50:00 +0200

Hi,

I wanted to use the following example to explain that abstract
interpretation can determine that i \in {-4,4} at the end of main().
However, the value analysis shows i \in {-4,0,4} at this point. But i ==
0 is not possible since !(i % 2 == 0) is necessary for the loop to
terminate.  Why doesn't the value analysis detect this?

int foo();

int main() {
int i;

i = foo();
while(i % 2 == 0) {
i = i/2;
}
i = 4 * (i % 2);
return 0;
}

--
Regards,
Boris