AStat/examples/interval/interval_goto.c

20 lines
412 B
C
Raw Normal View History

2024-05-29 11:47:47 +02:00
/*
* Cours "Sémantique et Application à la Vérification de programmes"
*
* Josselin Giet 2021
* Ecole normale supérieure, Paris, France / CNRS / INRIA
*/
void main(){
int i = 0;
if(brand){ goto L1; }
L0: // performing a widening here loose all information
goto LF;
L1:
if(brand) { i += 1; } else { i -= 1; } // i in [-1; 1]
goto L0;
LF:
assert(i <= 1);
assert(i >= -1);
}