# frama-c -wp [...]
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing tests/wp_acsl/looplabels.i (no preprocessing)
[wp] Running WP plugin...
[wp] Loading driver 'share/wp.driver'
[wp] Collecting axiomatic usage
[wp] warning: Missing RTE guards
------------------------------------------------------------
  Function copy
------------------------------------------------------------

Goal Post-condition (file tests/wp_acsl/looplabels.i, line 13) in 'copy':
Let a_0 = (shift_sint32 b_2 0).
Let a_2 = (shift_sint32 a_1 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_1) /\ (is_sint32 n_1).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_1))<=0)
        /\ ((region (base b_2))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_1.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_1).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_0 n_1).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_2 n_1 a_0 n_1).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_2 a_0 n_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 19) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (P_IsEqual Mint_2 a_1 b_2 i_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 18) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (0<=i_1) /\ (i_1<=n_1).
  (* tests/wp_acsl/looplabels.i:22: Else *)
  Have: n_1<=i_1.
}
Prove: (P_IsEqual Mint_2 a_1 b_2 n_1).

------------------------------------------------------------

Goal Preservation of Invariant (file tests/wp_acsl/looplabels.i, line 18):
Let a_1 = (shift_sint32 b_0 0).
Let a_2 = (shift_sint32 a_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_1) /\ (is_sint32 n_0) /\ (is_sint32 (1+i_1)).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_2 n_0 a_1 n_0).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_1 n_0).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 19) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (P_IsEqual Mint_3 a_0 b_0 i_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 18) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (0<=i_1) /\ (i_1<=n_0).
  (* tests/wp_acsl/looplabels.i:22: Then *)
  Have: i_1<n_0.
}
Prove: -1<=i_1.

------------------------------------------------------------

Goal Establishment of Invariant (file tests/wp_acsl/looplabels.i, line 18):
Let a_1 = (shift_sint32 a_0 0).
Let a_2 = (shift_sint32 b_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 n_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_1 n_0 a_2 n_0).
}
Prove: true.

------------------------------------------------------------

Goal Preservation of Invariant (file tests/wp_acsl/looplabels.i, line 19):
Let x_0 = 1+i_1.
Let a_1 = (shift_sint32 b_0 0).
Let a_2 = (shift_sint32 a_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_1) /\ (is_sint32 n_0) /\ (is_sint32 x_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_2 n_0 a_1 n_0).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_1 a_1 n_0).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 19) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (P_IsEqual Mint_1 a_0 b_0 i_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 18) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (0<=i_1) /\ (i_1<=n_0).
  (* tests/wp_acsl/looplabels.i:22: Then *)
  Have: i_1<n_0.
}
Prove: (P_IsEqual
         Mint_1[(shift_sint32 b_0 i_1)->Mint_1[(shift_sint32 a_0 i_1)]] a_0
         b_0 x_0).

------------------------------------------------------------

Goal Establishment of Invariant (file tests/wp_acsl/looplabels.i, line 19):
Let a_1 = (shift_sint32 a_0 0).
Let a_2 = (shift_sint32 b_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 n_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_1 n_0 a_2 n_0).
}
Prove: (P_IsEqual Mint_4 a_0 b_0 0).

------------------------------------------------------------

Goal Loop assigns (file tests/wp_acsl/looplabels.i, line 20) (1/3):
Assume { }
Prove: true.

------------------------------------------------------------

Goal Loop assigns (file tests/wp_acsl/looplabels.i, line 20) (2/3):
Effect at line 22
Let a_1 = (shift_sint32 b_0 0).
Let a_2 = (shift_sint32 a_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_1) /\ (is_sint32 n_0).
  (* Goal *)
  When: (valid_rd Malloc_0 a_1 n_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_2 n_0 a_1 n_0).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_1 n_0).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 19) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (P_IsEqual Mint_3 a_0 b_0 i_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 18) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (0<=i_1) /\ (i_1<=n_0).
  (* tests/wp_acsl/looplabels.i:22: Then *)
  Have: i_1<n_0.
}
Prove: (included a_1 n_0 a_1 n_0).

------------------------------------------------------------

Goal Loop assigns (file tests/wp_acsl/looplabels.i, line 20) (3/3):
Effect at line 23
Let a_1 = (shift_sint32 b_0 i_1).
Let a_2 = (shift_sint32 b_0 0).
Let a_3 = (shift_sint32 a_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_1) /\ (is_sint32 n_0).
  (* Goal *)
  When: (valid_rd Malloc_0 a_1 1).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_3 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_3 n_0 a_2 n_0).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_2 n_0).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 19) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (P_IsEqual Mint_3 a_0 b_0 i_1).
  (* Invariant (file tests/wp_acsl/looplabels.i, line 18) *)
  (* tests/wp_acsl/looplabels.i:22: Invariant: *)
  Have: (0<=i_1) /\ (i_1<=n_0).
  (* tests/wp_acsl/looplabels.i:22: Then *)
  Have: i_1<n_0.
}
Prove: (included a_1 1 a_2 n_0).

------------------------------------------------------------

Goal Assigns (file tests/wp_acsl/looplabels.i, line 14) in 'copy' (1/2):
Effect at line 22
Let a_1 = (shift_sint32 a_0 0).
Let a_2 = (shift_sint32 b_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 n_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_0 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_1 n_0 a_2 n_0).
}
Prove: true.

------------------------------------------------------------

Goal Assigns (file tests/wp_acsl/looplabels.i, line 14) in 'copy' (2/2):
Effect at line 22
Let a_1 = (shift_sint32 b_0 0).
Let a_2 = (shift_sint32 a_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 n_0).
  (* Heap *)
  Have: (linked Malloc_1) /\ ((region (base a_0))<=0)
        /\ ((region (base b_0))<=0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 9) in 'copy' *)
  (* Pre-condition: *)
  Have: 0<n_0.
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 10) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_1 a_2 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 11) in 'copy' *)
  (* Pre-condition: *)
  Have: (valid_rw Malloc_1 a_1 n_0).
  (* Pre-condition (file tests/wp_acsl/looplabels.i, line 12) in 'copy' *)
  (* Pre-condition: *)
  Have: (separated a_2 n_0 a_1 n_0).
  (* tests/wp_acsl/looplabels.i:22: Assigns *)
  (* tests/wp_acsl/looplabels.i:22: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_1 n_0).
}
Prove: (valid_rd Malloc_1 a_1 n_0) -> (included a_1 n_0 a_1 n_0).

------------------------------------------------------------
