# frama-c -wp [...] [kernel] Parsing reads.i (no preprocessing) [wp] Running WP plugin... [wp] Warning: Missing RTE guards ------------------------------------------------------------ Function f ------------------------------------------------------------ Goal Post-condition 'qed_ok' in 'f': Assume { Type: is_sint32(x) /\ is_sint32(y). (* Pre-condition *) Have: P_Q(y, x). (* Pre-condition *) Have: (0 <= x) /\ (x <= 10). (* Pre-condition *) Have: (0 <= y) /\ (y <= 10). } Prove: P_Q(1 + y, 1 + x). ------------------------------------------------------------ ------------------------------------------------------------ Function g ------------------------------------------------------------ Goal Post-condition 'qed_ok' in 'g': Let x = Mint_0[v]. Let x_1 = Mint_0[u]. Let m = Mint_0[u <- 1 + x_1]. Let x_2 = m[v]. Assume { Type: is_sint32(x_1) /\ is_sint32(x) /\ is_sint32(x_2). (* Heap *) Type: (region(u.base) <= 0) /\ (region(v.base) <= 0). (* Pre-condition *) Have: P_P(Mint_0, u, v). (* Pre-condition *) Have: (0 <= x_1) /\ (x_1 <= 10). (* Pre-condition *) Have: (0 <= x) /\ (x <= 10). } Prove: P_P(m[v <- 1 + x_2], u, v). ------------------------------------------------------------ ------------------------------------------------------------ Function modifies_x ------------------------------------------------------------ Goal Post-condition 'qed_ok,F_OK' in 'modifies_x': Prove: true. ------------------------------------------------------------ Goal Post-condition 'qed_ko,G_KO' in 'modifies_x': Assume { Type: is_sint32(x). (* Heap *) Type: is_sint32(y). (* Pre-condition 'H' *) Have: P_f /\ P_g(x) /\ P_h(y, x) /\ P_w(y, x). } Prove: P_g(1 + x). ------------------------------------------------------------ Goal Post-condition 'qed_ko,H_KO' in 'modifies_x': Assume { Type: is_sint32(x). (* Heap *) Type: is_sint32(y). (* Pre-condition 'H' *) Have: P_f /\ P_g(x) /\ P_h(y, x) /\ P_w(y, x). } Prove: P_h(y, 1 + x). ------------------------------------------------------------ Goal Post-condition 'qed_ok,W_OK,todo' in 'modifies_x': Assume { Type: is_sint32(x). (* Heap *) Type: is_sint32(y). (* Pre-condition 'H' *) Have: P_f /\ P_g(x) /\ P_h(y, x) /\ P_w(y, x). } Prove: P_w(y, 1 + x). ------------------------------------------------------------ ------------------------------------------------------------ Function modifies_y ------------------------------------------------------------ Goal Post-condition 'qed_ok,F_OK' in 'modifies_y': Prove: true. ------------------------------------------------------------ Goal Post-condition 'qed_ok,G_OK' in 'modifies_y': Prove: true. ------------------------------------------------------------ Goal Post-condition 'qed_ko,H_KO' in 'modifies_y': Assume { Type: is_sint32(y). (* Heap *) Type: is_sint32(x). (* Pre-condition 'H' *) Have: P_f /\ P_g(x) /\ P_h(y, x) /\ P_w(y, x). } Prove: P_h(1 + y, x). ------------------------------------------------------------ Goal Post-condition 'qed_ok,W_OK,todo' in 'modifies_y': Assume { Type: is_sint32(y). (* Heap *) Type: is_sint32(x). (* Pre-condition 'H' *) Have: P_f /\ P_g(x) /\ P_h(y, x) /\ P_w(y, x). } Prove: P_w(1 + y, x). ------------------------------------------------------------