Commit 0770367b authored by Robbert Krebbers's avatar Robbert Krebbers

Improve notations for binary logrel.

parent 42b71ff1
...@@ -199,9 +199,9 @@ Section bin_log_related_under_typed_ctx. ...@@ -199,9 +199,9 @@ Section bin_log_related_under_typed_ctx.
( f, e.[base.iter (length Γ) up f] = e) ( f, e.[base.iter (length Γ) up f] = e)
( f, e'.[base.iter (length Γ) up f] = e') ( f, e'.[base.iter (length Γ) up f] = e')
typed_ctx K Γ τ Γ' τ' typed_ctx K Γ τ Γ' τ'
( Δ (HΔ : ctx_PersistentP Δ), @bin_log_related _ _ _ Δ Γ e e' τ) ( Δ (HΔ : ctx_PersistentP Δ), Δ Γ e log e' : τ)
Δ (HΔ : ctx_PersistentP Δ), Δ (HΔ : ctx_PersistentP Δ),
@bin_log_related _ _ _ Δ Γ' (fill_ctx K e) (fill_ctx K e') τ'. Δ Γ' fill_ctx K e log fill_ctx K e' : τ'.
Proof. Proof.
revert Γ τ Γ' τ' e e'. revert Γ τ Γ' τ' e e'.
induction K as [|k K]=> Γ τ Γ' τ' e e' H1 H2; simpl. induction K as [|k K]=> Γ τ Γ' τ' e e' H1 H2; simpl.
......
...@@ -254,8 +254,7 @@ Section CG_Counter. ...@@ -254,8 +254,7 @@ Section CG_Counter.
Definition counterN : namespace := nroot .@ "counter". Definition counterN : namespace := nroot .@ "counter".
Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} : Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} :
@bin_log_related _ _ _ Δ [] FG_counter CG_counter Δ [] FG_counter log CG_counter : TProd (TArrow TUnit TUnit) (TArrow TUnit TNat).
(TProd (TArrow TUnit TUnit) (TArrow TUnit TNat)).
Proof. Proof.
(* executing the preambles *) (* executing the preambles *)
intros [|v vs] ρ j K [=]. intros [|v vs] ρ j K [=].
......
...@@ -13,15 +13,10 @@ Section Stack_refinement. ...@@ -13,15 +13,10 @@ Section Stack_refinement.
Implicit Types Δ : listC D. Implicit Types Δ : listC D.
Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} : Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} :
@bin_log_related _ _ _ Δ [] FG_stack CG_stack Δ [] FG_stack log CG_stack : TForall (TProd (TProd
(TForall (TArrow (TVar 0) TUnit)
(TProd (TArrow TUnit (TSum TUnit (TVar 0))))
(TProd (TArrow (TArrow (TVar 0) TUnit) TUnit)).
(TArrow (TVar 0) TUnit)
(TArrow TUnit (TSum TUnit (TVar 0)))
)
(TArrow (TArrow (TVar 0) TUnit) TUnit)
)).
Proof. Proof.
(* executing the preambles *) (* executing the preambles *)
iIntros { [|??] ρ j K [=] } "[#Hheap [#Hspec [_ Hj]]]". iIntros { [|??] ρ j K [=] } "[#Hheap [#Hspec [_ Hj]]]".
...@@ -376,16 +371,10 @@ End Stack_refinement. ...@@ -376,16 +371,10 @@ End Stack_refinement.
Definition Σ := #[authGF heapUR; authGF cfgUR; authGF stackUR]. Definition Σ := #[authGF heapUR; authGF cfgUR; authGF stackUR].
Theorem stack_ctx_refinement : Theorem stack_ctx_refinement :
ctx_refines [] FG_stack CG_stack ctx_refines [] FG_stack CG_stack (TForall (TProd (TProd
(TForall (TArrow (TVar 0) TUnit)
(TProd (TArrow TUnit (TSum TUnit (TVar 0))))
(TProd (TArrow (TArrow (TVar 0) TUnit) TUnit))).
(TArrow (TVar 0) TUnit)
(TArrow TUnit (TSum TUnit (TVar 0)))
)
(TArrow (TArrow (TVar 0) TUnit) TUnit)
)
).
Proof. Proof.
eapply (@binary_soundness Σ); eapply (@binary_soundness Σ);
eauto using FG_stack_closed, CG_stack_closed. eauto using FG_stack_closed, CG_stack_closed.
......
This diff is collapsed.
...@@ -12,8 +12,7 @@ Section soundness. ...@@ -12,8 +12,7 @@ Section soundness.
Local Opaque to_heap. Local Opaque to_heap.
Lemma wp_basic_soundness e e' τ : Lemma wp_basic_soundness e e' τ :
( H H' Δ (HΔ : ctx_PersistentP Δ), ( `{heapIG Σ, cfgSG Σ} Δ (HΔ : ctx_PersistentP Δ), Δ [] e log e' : τ)
@bin_log_related Σ H H' Δ [] e e' τ)
ownP (Σ:=globalF Σ) ownP (Σ:=globalF Σ)
WP e {{ _, thp' h v, rtc step ([e'], ) (# v :: thp', h) }}. WP e {{ _, thp' h v, rtc step ([e'], ) (# v :: thp', h) }}.
Proof. Proof.
...@@ -63,7 +62,7 @@ Section soundness. ...@@ -63,7 +62,7 @@ Section soundness.
Qed. Qed.
Lemma basic_soundness e e' τ v thp hp : Lemma basic_soundness e e' τ v thp hp :
( H H' Δ (HΔ : ctx_PersistentP Δ), @bin_log_related Σ H H' Δ [] e e' τ) ( `{heapIG Σ, cfgSG Σ} Δ (HΔ : ctx_PersistentP Δ), Δ [] e log e' : τ)
rtc step ([e], ) (# v :: thp, hp) rtc step ([e], ) (# v :: thp, hp)
( thp' hp' v', rtc step ([e'], ) (# v' :: thp', hp')). ( thp' hp' v', rtc step ([e'], ) (# v' :: thp', hp')).
Proof. Proof.
...@@ -81,7 +80,7 @@ Section soundness. ...@@ -81,7 +80,7 @@ Section soundness.
Lemma binary_soundness Γ e e' τ : Lemma binary_soundness Γ e e' τ :
( f, e.[base.iter (length Γ) up f] = e) ( f, e.[base.iter (length Γ) up f] = e)
( f, e'.[base.iter (length Γ) up f] = e') ( f, e'.[base.iter (length Γ) up f] = e')
( H H' Δ (HΔ : ctx_PersistentP Δ), @bin_log_related Σ H H' Δ Γ e e' τ) ( `{heapIG Σ, cfgSG Σ} Δ (HΔ : ctx_PersistentP Δ), Δ Γ e log e' : τ)
ctx_refines Γ e e' τ. ctx_refines Γ e e' τ.
Proof. Proof.
intros H1 K HK htp hp v Hstp Hc Hc'. intros H1 K HK htp hp v Hstp Hc Hc'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment