Skip to content

unrolling loop statements with labels into there annotations are not handled correctly (in conjunction with -ulevel)

ID0001135: This issue was created automatically from Mantis Issue 1135. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001135 Frama-C Kernel public 2012-03-27 2014-02-12
Reporter patrick Assigned To patrick Resolution fixed
Priority normal Severity major Reproducibility have not tried
Platform - OS - OS Version -
Product Version Frama-C GIT, precise the release id Target Version - Fixed in Version Frama-C Oxygen-20120901

Description :

Fresh labels and correct gotos are introduced when unrolling loop statements, but labels into code annotations are not handled correctly.

Into the given example, the assertion is not unrolled correctly.

Additional Information :

cat file.c int X ; void main (int c) { for (int i = 0 ; i < 10 ;) { if (c) goto there ; X++; there: i++; //@ assert c==0 ==> \at(X,there)==i+1; } }

frama-c file.c -ulevel 1 -print int X; void main(int c) { int i; i = 0; if (! (i < 10)) { goto unrolling_2_loop; } if (c) { goto there_unrolling_4_loop; } X ++; there_unrolling_4_loop: /* internal / i ++; /@ assert c ? 0 ? \at(X,there) ? i+1; / ; unrolling_3_loop: / internal / ; while (i < 10) { if (c) { goto there; } X ++; there: i ++; /@ assert c ? 0 ? \at(X,there) ? i+1; / ; } unrolling_2_loop: / internal */ ; return; }

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information