When I run the WP example, there is an error, and i don't know what it is.
/*@ requires \valid(a) && \valid(b);
@ ensures A: *a == \old(*b) ;
@ ensures B: *b == \old(*a) ;
@ assigns *a,*b ;
@*/
void swap(int *a, int *b){
int tmp = *a;
*a = *b;
*b = tmp;
// int tmp = *b;
// *b = *a;
// *a = tmp;
}
this is the error in console of frama-c-gui
[wp] No updated script.
[wp] [Alt-Ergo 2.3.1] Goal typed_swap_ensures_A : Failed
Unknown error
the output after executing " frama-c -wp -wp-rte swap.c"
[kernel] Parsing swap.c (with preprocessing)
[rte] annotating function swap
[wp] 8 goals scheduled
[wp] [Alt-Ergo 2.0.0] Goal typed_swap_assert_rte_mem_access : Failed
Unknown error
[wp] [Alt-Ergo 2.0.0] Goal typed_swap_ensures_A : Failed
Unknown error
[wp] [Alt-Ergo 2.0.0] Goal typed_swap_assert_rte_mem_access_3 : Failed
Unknown error
[wp] Proved goals: 5 / 8
Qed: 5 (16ms)
Alt-Ergo 2.0.0: 0 (failed: 3)
Thank you very much if you can help me
Which frama-c version do you have ?
With
Alt-Ergo 2.3.3
andframa-c 21.1
(Scandium)With
Alt-Ergo 2.0.0
andframa-c 21.1
, I get an error but it's different from yours: