Skip to content
Snippets Groups Projects
Commit 7a5a0eef authored by Patrick Baudin's avatar Patrick Baudin
Browse files

[WP] Review of the sequent decomposition

parent ba012b79
No related branches found
No related tags found
No related merge requests found
...@@ -447,7 +447,10 @@ let rec exist_intro p = ...@@ -447,7 +447,10 @@ let rec exist_intro p =
let _,t = e_open ~pool ~exists:true let _,t = e_open ~pool ~exists:true
~forall:false ~lambda:false (e_prop p) in ~forall:false ~lambda:false (e_prop p) in
exist_intro (F.p_bool t) exist_intro (F.p_bool t)
| _ -> | _ -> (* Note: Qed implement De Morgan rules
such that [p] cannot match the
decomposable representations:
Not Or, Not Imply, Not Forall *)
if Wp_parameters.Prenex.get () if Wp_parameters.Prenex.get ()
then prenex_intro p then prenex_intro p
else p else p
...@@ -463,7 +466,11 @@ let rec exist_intros = function ...@@ -463,7 +466,11 @@ let rec exist_intros = function
let _,t = F.QED.e_open ~pool ~exists:true let _,t = F.QED.e_open ~pool ~exists:true
~forall:false ~lambda:false (e_prop p) in ~forall:false ~lambda:false (e_prop p) in
exist_intros ((F.p_bool t)::hs) exist_intros ((F.p_bool t)::hs)
| _ -> p::(exist_intros hs) | _ -> (* Note: Qed implement De Morgan rules
such that [p] cannot match the
decomposable representations:
Not Or, Not Imply, Not Forall *)
p::(exist_intros hs)
end end
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
...@@ -488,8 +495,17 @@ let rec forall_intro p = ...@@ -488,8 +495,17 @@ let rec forall_intro p =
(hp @ hs), (p::ps)) ([],[]) qs (hp @ hs), (p::ps)) ([],[]) qs
in (* ORs qs <==> ORs (hps ==> ps) in (* ORs qs <==> ORs (hps ==> ps)
<==> ((ANDs hps) ==> ORs ps) *) <==> ((ANDs hps) ==> ORs ps) *)
hps, (p_disj ps) let hps,ps = List.fold_left (fun (hs,ps) q ->
| _ -> [] , p match F.repr (F.e_prop q) with
| Neq _ -> ((F.p_not q)::hs), ps
| _ -> hs, (q::ps)) (hps,[]) ps
in (* ORs qs <==> ((ANDs hps) ==> ORs ps)) *)
hps, (F.p_disj ps)
| _ -> (* Note: Qed implement De Morgan rules
such that [p] cannot match the
decomposable representations:
Not And, Not Exists *)
[] , p
(* -------------------------------------------------------------------------- *) (* -------------------------------------------------------------------------- *)
(* --- Constructors --- *) (* --- Constructors --- *)
......
...@@ -39,6 +39,7 @@ Prove: table_of_base(G_z_33) = table_of_base(G_x_31). ...@@ -39,6 +39,7 @@ Prove: table_of_base(G_z_33) = table_of_base(G_x_31).
------------------------------------------------------------ ------------------------------------------------------------
Goal Check 'KO' (file base_offset.i, line 30): Goal Check 'KO' (file base_offset.i, line 30):
Prove: table_of_base(G_y_32) != table_of_base(G_x_31). Assume { (* Goal *) When: table_of_base(G_y_32) = table_of_base(G_x_31). }
Prove: false.
------------------------------------------------------------ ------------------------------------------------------------
...@@ -153,12 +153,7 @@ Prove: (a = 0) /\ (b = 0). ...@@ -153,12 +153,7 @@ Prove: (a = 0) /\ (b = 0).
------------------------------------------------------------ ------------------------------------------------------------
Goal Post-condition for 'true' (file bitwise.i, line 78) in 'bor_bool': Goal Post-condition for 'true' (file bitwise.i, line 78) in 'bor_bool':
Assume { Prove: true.
Type: is_bool(a) /\ is_bool(b).
(* Pre-condition for 'true' *)
Have: (a = 1) \/ (b = 1).
}
Prove: (a != 0) \/ (b != 0).
------------------------------------------------------------ ------------------------------------------------------------
------------------------------------------------------------ ------------------------------------------------------------
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
[wp] [Qed] Goal typed_lshift_shift2_ensures_lsl3 : Valid [wp] [Qed] Goal typed_lshift_shift2_ensures_lsl3 : Valid
[wp] [Qed] Goal typed_rshift_ensures : Valid [wp] [Qed] Goal typed_rshift_ensures : Valid
[wp] [Qed] Goal typed_rshift_shift1_ensures_lsr1 : Valid [wp] [Qed] Goal typed_rshift_shift1_ensures_lsr1 : Valid
[wp] [Alt-Ergo] Goal typed_bor_bool_true_ensures : Valid [wp] [Qed] Goal typed_bor_bool_true_ensures : Valid
[wp] [Alt-Ergo] Goal typed_bor_bool_false_ensures : Valid [wp] [Alt-Ergo] Goal typed_bor_bool_false_ensures : Valid
[wp] [Qed] Goal typed_band_bool_true_ensures : Valid [wp] [Qed] Goal typed_band_bool_true_ensures : Valid
[wp] [Alt-Ergo] Goal typed_band_bool_false_ensures : Valid [wp] [Alt-Ergo] Goal typed_band_bool_false_ensures : Valid
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
[wp] [Qed] Goal typed_lemma_check_7 : Valid [wp] [Qed] Goal typed_lemma_check_7 : Valid
[wp] [Qed] Goal typed_cast_uchar_ensures : Valid [wp] [Qed] Goal typed_cast_uchar_ensures : Valid
[wp] Proved goals: 38 / 38 [wp] Proved goals: 38 / 38
Qed: 34 Qed: 35
Alt-Ergo: 4 Alt-Ergo: 3
------------------------------------------------------------ ------------------------------------------------------------
Functions WP Alt-Ergo Total Success Functions WP Alt-Ergo Total Success
band 8 - 8 100% band 8 - 8 100%
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
bnot 1 - 1 100% bnot 1 - 1 100%
lshift 4 - 4 100% lshift 4 - 4 100%
rshift 2 - 2 100% rshift 2 - 2 100%
bor_bool - 2 2 100% bor_bool 1 1 2 100%
band_bool 1 1 2 100% band_bool 1 1 2 100%
bxor_bool 1 1 2 100% bxor_bool 1 1 2 100%
lemma 7 - 7 100% lemma 7 - 7 100%
......
...@@ -174,7 +174,7 @@ Prove: (i + L_f(i)) != b. ...@@ -174,7 +174,7 @@ Prove: (i + L_f(i)) != b.
------------------------------------------------------------ ------------------------------------------------------------
Goal Post-condition 'ko4' in 'forall': Goal Post-condition 'ko4' in 'forall':
Prove: (L_f(i) != i_1) \/ P_P(i_1). Prove: P_P(L_f(i)).
------------------------------------------------------------ ------------------------------------------------------------
......
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