Skip to content
Snippets Groups Projects
Commit 04d9c591 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Simplify heap_lang/lifting.v proofs.

parent 5e3835f8
No related branches found
No related tags found
No related merge requests found
...@@ -61,7 +61,7 @@ Lemma wp_load_pst E σ l v : ...@@ -61,7 +61,7 @@ Lemma wp_load_pst E σ l v :
σ !! l = Some v σ !! l = Some v
{{{ ownP σ }}} Load (Lit (LitLoc l)) @ E {{{ RET v; ownP σ }}}. {{{ ownP σ }}} Load (Lit (LitLoc l)) @ E {{{ RET v; ownP σ }}}.
Proof. Proof.
intros ? Φ. apply (wp_lift_atomic_det_head_step' σ v σ); eauto. intros ? Φ. apply wp_lift_atomic_det_head_step'; eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
...@@ -70,7 +70,7 @@ Lemma wp_store_pst E σ l v v' : ...@@ -70,7 +70,7 @@ Lemma wp_store_pst E σ l v v' :
{{{ ownP σ }}} Store (Lit (LitLoc l)) (of_val v) @ E {{{ ownP σ }}} Store (Lit (LitLoc l)) (of_val v) @ E
{{{ RET LitV LitUnit; ownP (<[l:=v]>σ) }}}. {{{ RET LitV LitUnit; ownP (<[l:=v]>σ) }}}.
Proof. Proof.
intros. apply (wp_lift_atomic_det_head_step' σ (LitV LitUnit) (<[l:=v]>σ)); eauto. intros. apply wp_lift_atomic_det_head_step'; eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
...@@ -79,7 +79,7 @@ Lemma wp_cas_fail_pst E σ l v1 v2 v' : ...@@ -79,7 +79,7 @@ Lemma wp_cas_fail_pst E σ l v1 v2 v' :
{{{ ownP σ }}} CAS (Lit (LitLoc l)) (of_val v1) (of_val v2) @ E {{{ ownP σ }}} CAS (Lit (LitLoc l)) (of_val v1) (of_val v2) @ E
{{{ RET LitV $ LitBool false; ownP σ }}}. {{{ RET LitV $ LitBool false; ownP σ }}}.
Proof. Proof.
intros. apply (wp_lift_atomic_det_head_step' σ (LitV $ LitBool false) σ); eauto. intros. apply wp_lift_atomic_det_head_step'; eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
...@@ -88,8 +88,7 @@ Lemma wp_cas_suc_pst E σ l v1 v2 : ...@@ -88,8 +88,7 @@ Lemma wp_cas_suc_pst E σ l v1 v2 :
{{{ ownP σ }}} CAS (Lit (LitLoc l)) (of_val v1) (of_val v2) @ E {{{ ownP σ }}} CAS (Lit (LitLoc l)) (of_val v1) (of_val v2) @ E
{{{ RET LitV $ LitBool true; ownP (<[l:=v2]>σ) }}}. {{{ RET LitV $ LitBool true; ownP (<[l:=v2]>σ) }}}.
Proof. Proof.
intros. apply (wp_lift_atomic_det_head_step' σ (LitV $ LitBool true) intros. apply wp_lift_atomic_det_head_step'; eauto.
(<[l:=v2]>σ)); eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
...@@ -136,14 +135,14 @@ Qed. ...@@ -136,14 +135,14 @@ Qed.
Lemma wp_if_true E e1 e2 Φ : Lemma wp_if_true E e1 e2 Φ :
WP e1 @ E {{ Φ }} WP If (Lit (LitBool true)) e1 e2 @ E {{ Φ }}. WP e1 @ E {{ Φ }} WP If (Lit (LitBool true)) e1 e2 @ E {{ Φ }}.
Proof. Proof.
rewrite -(wp_lift_pure_det_head_step' (If _ _ _) e1); eauto. apply wp_lift_pure_det_head_step'; eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
Lemma wp_if_false E e1 e2 Φ : Lemma wp_if_false E e1 e2 Φ :
WP e2 @ E {{ Φ }} WP If (Lit (LitBool false)) e1 e2 @ E {{ Φ }}. WP e2 @ E {{ Φ }} WP If (Lit (LitBool false)) e1 e2 @ E {{ Φ }}.
Proof. Proof.
rewrite -(wp_lift_pure_det_head_step' (If _ _ _) e2); eauto. apply wp_lift_pure_det_head_step'; eauto.
intros; inv_head_step; eauto. intros; inv_head_step; eauto.
Qed. Qed.
......
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