Skip to content
Snippets Groups Projects
Commit a9ca0bfb authored by Loïc Correnson's avatar Loïc Correnson
Browse files

[wp] fixed duplicated returns

parent 62fb6a2f
No related branches found
No related tags found
No related merge requests found
...@@ -270,7 +270,7 @@ Prove: valid_rw(Malloc_0, p[i], 1). ...@@ -270,7 +270,7 @@ Prove: valid_rw(Malloc_0, p[i], 1).
Goal Post-condition (file tests/wp_typed/array_initialized.c, line 288) in 'simpl': Goal Post-condition (file tests/wp_typed/array_initialized.c, line 288) in 'simpl':
Let x = Mint_0[shift_sint32(t, 0)]. Let x = Mint_0[shift_sint32(t, 0)].
Assume { Assume {
Type: is_sint32(x). Type: is_sint32(simpl_0) /\ is_sint32(x).
(* Heap *) (* Heap *)
Type: region(t.base) <= 0. Type: region(t.base) <= 0.
(* Goal *) (* Goal *)
...@@ -279,8 +279,8 @@ Assume { ...@@ -279,8 +279,8 @@ Assume {
Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 49) -> Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 49) ->
(Mint_0[shift_sint32(t, i_1)] = x))). (Mint_0[shift_sint32(t, i_1)] = x))).
If 0 <= x If 0 <= x
Then { (* Return *) Have: simpl_0 = 1. } Then { Have: simpl_0 = 1. }
Else { (* Return *) Have: simpl_0 = 0. } Else { Have: simpl_0 = 0. }
} }
Prove: (0 <= Mint_0[shift_sint32(t, i)]) <-> (simpl_0 = 1). Prove: (0 <= Mint_0[shift_sint32(t, i)]) <-> (simpl_0 = 1).
......
...@@ -273,7 +273,7 @@ Prove: valid_rw(Malloc_0, Mptr_0[shift_PTR(a, i)], 1). ...@@ -273,7 +273,7 @@ Prove: valid_rw(Malloc_0, Mptr_0[shift_PTR(a, i)], 1).
Goal Post-condition (file tests/wp_typed/array_initialized.c, line 288) in 'simpl': Goal Post-condition (file tests/wp_typed/array_initialized.c, line 288) in 'simpl':
Let x = Mint_0[shift_sint32(t, 0)]. Let x = Mint_0[shift_sint32(t, 0)].
Assume { Assume {
Type: is_sint32(x). Type: is_sint32(simpl_0) /\ is_sint32(x).
(* Heap *) (* Heap *)
Type: region(t.base) <= 0. Type: region(t.base) <= 0.
(* Goal *) (* Goal *)
...@@ -282,8 +282,8 @@ Assume { ...@@ -282,8 +282,8 @@ Assume {
Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 49) -> Have: forall i_1 : Z. ((0 <= i_1) -> ((i_1 <= 49) ->
(Mint_0[shift_sint32(t, i_1)] = x))). (Mint_0[shift_sint32(t, i_1)] = x))).
If 0 <= x If 0 <= x
Then { (* Return *) Have: simpl_0 = 1. } Then { Have: simpl_0 = 1. }
Else { (* Return *) Have: simpl_0 = 0. } Else { Have: simpl_0 = 0. }
} }
Prove: (0 <= Mint_0[shift_sint32(t, i)]) <-> (simpl_0 = 1). Prove: (0 <= Mint_0[shift_sint32(t, i)]) <-> (simpl_0 = 1).
......
...@@ -26,7 +26,7 @@ Goal Post-condition (file tests/wp_typed/user_rec.i, line 9) in 'F1': ...@@ -26,7 +26,7 @@ Goal Post-condition (file tests/wp_typed/user_rec.i, line 9) in 'F1':
Assume { Assume {
Type: is_sint32(F1_0) /\ is_sint32(i) /\ is_sint32(n). Type: is_sint32(F1_0) /\ is_sint32(i) /\ is_sint32(n).
If n <= 1 If n <= 1
Then { (* Return *) Have: F1_0 = 1. } Then { Have: F1_0 = 1. }
Else { Else {
(* Invariant *) (* Invariant *)
Have: L_fact(i - 1) = F1_0. Have: L_fact(i - 1) = F1_0.
......
...@@ -26,7 +26,7 @@ Goal Post-condition (file tests/wp_typed/user_rec.i, line 9) in 'F1': ...@@ -26,7 +26,7 @@ Goal Post-condition (file tests/wp_typed/user_rec.i, line 9) in 'F1':
Assume { Assume {
Type: is_sint32(F1_0) /\ is_sint32(i) /\ is_sint32(n). Type: is_sint32(F1_0) /\ is_sint32(i) /\ is_sint32(n).
If n <= 1 If n <= 1
Then { (* Return *) Have: F1_0 = 1. } Then { Have: F1_0 = 1. }
Else { Else {
(* Invariant *) (* Invariant *)
Have: L_fact(i - 1) = F1_0. Have: L_fact(i - 1) = F1_0.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment