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

Goal Post-condition (file tests/wp_acsl/simpl_is_type.i, line 17) in 'f':
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0)
        /\ (is_sint32 Mint_1[(shift_sint32 t_2 i_3)]).
  (* Goal *)
  When: (i_5<size_0) /\ (0<=i_5) /\ (is_sint32 i_5).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_2))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_2 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_2 (shift_sint32 t_2 0) size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_2[(shift_sint32 t_2 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_2[(shift_sint32 t_2 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Else *)
  Have: size_0<=i_3.
}
Prove: 0<Mint_2[(shift_sint32 t_2 i_5)].

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

Goal Preservation of Invariant (file tests/wp_acsl/simpl_is_type.i, line 22):
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 (1+i_3))
        /\ (is_sint32 Mint_1[(shift_sint32 t_0 i_3)]).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 (shift_sint32 t_0 0) size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_3[(shift_sint32 t_0 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_3[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Then *)
  Have: i_3<size_0.
}
Prove: -1<=i_3.

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

Goal Establishment of Invariant (file tests/wp_acsl/simpl_is_type.i, line 22):
Assume {
  (* Domain *)
  Type: (is_sint32 size_0) /\ (is_sint32 Mint_1[(shift_sint32 t_0 i_3)]).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
}
Prove: true.

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

Goal Preservation of Invariant (file tests/wp_acsl/simpl_is_type.i, line 23):
Let a_0 = (shift_sint32 t_0 i_3).
Let x_0 = Mint_1[a_0].
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 (1+i_3))
        /\ (is_sint32 x_0).
  (* Goal *)
  When: (0<=i_1) /\ (i_1<=i_3) /\ (is_sint32 i_1).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_1 (shift_sint32 t_0 0) size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_1[(shift_sint32 t_0 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_1[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Then *)
  Have: i_3<size_0.
}
Prove: 0<Mint_1[a_0->-x_0][(shift_sint32 t_0 i_1)].

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

Goal Establishment of Invariant (file tests/wp_acsl/simpl_is_type.i, line 23):
Assume { (* Goal *) When: false. }
Prove: 0<Mint_4[(shift_sint32 t_0 i_8)].

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

Goal Preservation of Invariant (file tests/wp_acsl/simpl_is_type.i, line 24):
Let a_0 = (shift_sint32 t_0 i_3).
Let x_0 = Mint_1[a_0].
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 (1+i_3))
        /\ (is_sint32 x_0).
  (* Goal *)
  When: (i_2<size_0) /\ (i_3<i_2) /\ (is_sint32 i_2).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_1 (shift_sint32 t_0 0) size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_1[(shift_sint32 t_0 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_1[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Then *)
  Have: i_3<size_0.
}
Prove: Mint_1[a_0->-x_0][(shift_sint32 t_0 i_2)]<0.

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

Goal Establishment of Invariant (file tests/wp_acsl/simpl_is_type.i, line 24):
Assume {
  (* Domain *)
  Type: (is_sint32 size_0) /\ (is_sint32 Mint_1[(shift_sint32 t_0 i_3)]).
  (* Goal *)
  When: (i_9<size_0) /\ (0<=i_9) /\ (is_sint32 i_9).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
}
Prove: Mint_4[(shift_sint32 t_0 i_9)]<0.

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

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

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

Goal Loop assigns (file tests/wp_acsl/simpl_is_type.i, line 25) (2/3):
Effect at line 27
Let a_0 = (shift_sint32 t_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0)
        /\ (is_sint32 Mint_1[(shift_sint32 t_0 i_3)]).
  (* Goal *)
  When: (valid_rd Malloc_0 a_0 size_0).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_0 size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_3[(shift_sint32 t_0 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_3[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Then *)
  Have: i_3<size_0.
}
Prove: (included a_0 size_0 a_0 size_0).

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

Goal Loop assigns (file tests/wp_acsl/simpl_is_type.i, line 25) (3/3):
Effect at line 28
Let a_0 = (shift_sint32 t_0 i_3).
Let a_1 = (shift_sint32 t_0 0).
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 Mint_1[a_0]).
  (* Goal *)
  When: (valid_rd Malloc_0 a_0 1).
  (* Heap *)
  Have: (linked Malloc_0) /\ ((region (base t_0))<=0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 15) in 'f' *)
  (* Pre-condition: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (0<=i_0) -> (Mint_4[(shift_sint32 t_0 i_0)]<0).
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 16) in 'f' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* tests/wp_acsl/simpl_is_type.i:27: Assigns *)
  (* tests/wp_acsl/simpl_is_type.i:27: Loop assigns ...: *)
  Have: (havoc Mint_4 Mint_3 a_1 size_0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 24) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<size_0) -> (i_3<=i_0) -> (Mint_3[(shift_sint32 t_0 i_0)]<0).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 23) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (0<Mint_3[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 22) *)
  (* tests/wp_acsl/simpl_is_type.i:27: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:27: Then *)
  Have: i_3<size_0.
}
Prove: (included a_0 1 a_1 size_0).

------------------------------------------------------------
------------------------------------------------------------
  Function g
------------------------------------------------------------

Goal Post-condition (file tests/wp_acsl/simpl_is_type.i, line 35) in 'g':
Let a_0 = (shift_sint32 t_0 i_3).
Let x_0 = Mint_0[a_0].
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 x_0)
        /\ (is_sint32 Mint_2[a_0]).
  (* Heap *)
  Have: (region (base t_0))<=0.
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 34) in 'g' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 46) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (x_0!=Mint_0[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 44) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:50: Conditional *)
  Have: i_3<size_0.
}
Prove: exists i_0:int.
       (i_0<size_0) /\ (0<=i_0) /\ (x_0=Mint_0[(shift_sint32 t_0 i_0)])
       /\ (forall i_1:int.
           (i_1<i_0) -> (0<=i_1) -> (x_0!=Mint_0[(shift_sint32 t_0 i_1)])).

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

Goal Preservation of Invariant (file tests/wp_acsl/simpl_is_type.i, line 44):
Let x_1 = Mint_2[(shift_sint32 t_0 i_3)].
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_1) /\ (is_sint32 x_0)
        /\ (is_sint32 (1+i_3)) /\ (is_sint32 x_1).
  (* Heap *)
  Have: (region (base t_0))<=0.
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 34) in 'g' *)
  (* Pre-condition: *)
  Have: 0<size_1.
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 46) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (x_0!=Mint_2[(shift_sint32 t_0 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 44) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_1).
  (* tests/wp_acsl/simpl_is_type.i:50: Then *)
  Have: i_3<size_1.
  (* tests/wp_acsl/simpl_is_type.i:52: Else *)
  Have: x_0!=x_1.
}
Prove: -1<=i_3.

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

Goal Establishment of Invariant (file tests/wp_acsl/simpl_is_type.i, line 44):
Assume {
  (* Domain *)
  Type: (is_sint32 size_1) /\ (is_sint32 Mint_2[(shift_sint32 t_1 i_3)]).
  (* Heap *)
  Have: (region (base t_1))<=0.
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 34) in 'g' *)
  (* Pre-condition: *)
  Have: 0<size_1.
}
Prove: true.

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

Goal Preservation of Invariant (file tests/wp_acsl/simpl_is_type.i, line 46):
Let x_0 = Mint_1[(shift_sint32 t_1 i_3)].
Assume {
  (* Domain *)
  Type: (is_sint32 i_3) /\ (is_sint32 size_0) /\ (is_sint32 x_1)
        /\ (is_sint32 (1+i_3)) /\ (is_sint32 x_0).
  (* Goal *)
  When: (0<=i_2) /\ (i_2<=i_3) /\ (is_sint32 i_2).
  (* Heap *)
  Have: (region (base t_1))<=0.
  (* Pre-condition (file tests/wp_acsl/simpl_is_type.i, line 34) in 'g' *)
  (* Pre-condition: *)
  Have: 0<size_0.
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 46) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: forall i_0:int.
        (i_0<i_3) -> (0<=i_0) -> (x_1!=Mint_1[(shift_sint32 t_1 i_0)]).
  (* Invariant (file tests/wp_acsl/simpl_is_type.i, line 44) *)
  (* tests/wp_acsl/simpl_is_type.i:50: Invariant: *)
  Have: (0<=i_3) /\ (i_3<=size_0).
  (* tests/wp_acsl/simpl_is_type.i:50: Then *)
  Have: i_3<size_0.
  (* tests/wp_acsl/simpl_is_type.i:52: Else *)
  Have: x_1!=x_0.
}
Prove: x_1!=Mint_1[(shift_sint32 t_1 i_2)].

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

Goal Establishment of Invariant (file tests/wp_acsl/simpl_is_type.i, line 46):
Assume { (* Goal *) When: false. }
Prove: x_1!=Mint_3[(shift_sint32 t_1 i_5)].

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

Goal Loop assigns (file tests/wp_acsl/simpl_is_type.i, line 48):
Assume { }
Prove: true.

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