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.
( f, e.[base.iter (length Γ) up f] = e)
( f, e'.[base.iter (length Γ) up f] = e')
typed_ctx K Γ τ Γ' τ'
( Δ (HΔ : ctx_PersistentP Δ), @bin_log_related _ _ _ Δ Γ e e' τ)
( Δ (HΔ : ctx_PersistentP Δ), Δ Γ e log e' : τ)
Δ (HΔ : ctx_PersistentP Δ),
@bin_log_related _ _ _ Δ Γ' (fill_ctx K e) (fill_ctx K e') τ'.
Δ Γ' fill_ctx K e log fill_ctx K e' : τ'.
Proof.
revert Γ τ Γ' τ' e e'.
induction K as [|k K]=> Γ τ Γ' τ' e e' H1 H2; simpl.
......
......@@ -254,8 +254,7 @@ Section CG_Counter.
Definition counterN : namespace := nroot .@ "counter".
Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} :
@bin_log_related _ _ _ Δ [] FG_counter CG_counter
(TProd (TArrow TUnit TUnit) (TArrow TUnit TNat)).
Δ [] FG_counter log CG_counter : TProd (TArrow TUnit TUnit) (TArrow TUnit TNat).
Proof.
(* executing the preambles *)
intros [|v vs] ρ j K [=].
......
......@@ -13,15 +13,10 @@ Section Stack_refinement.
Implicit Types Δ : listC D.
Lemma FG_CG_counter_refinement Δ {HΔ : ctx_PersistentP Δ} :
@bin_log_related _ _ _ Δ [] FG_stack CG_stack
(TForall
(TProd
(TProd
Δ [] FG_stack log CG_stack : TForall (TProd (TProd
(TArrow (TVar 0) TUnit)
(TArrow TUnit (TSum TUnit (TVar 0)))
)
(TArrow (TArrow (TVar 0) TUnit) TUnit)
)).
(TArrow TUnit (TSum TUnit (TVar 0))))
(TArrow (TArrow (TVar 0) TUnit) TUnit)).
Proof.
(* executing the preambles *)
iIntros { [|??] ρ j K [=] } "[#Hheap [#Hspec [_ Hj]]]".
......@@ -376,16 +371,10 @@ End Stack_refinement.
Definition Σ := #[authGF heapUR; authGF cfgUR; authGF stackUR].
Theorem stack_ctx_refinement :
ctx_refines [] FG_stack CG_stack
(TForall
(TProd
(TProd
ctx_refines [] FG_stack CG_stack (TForall (TProd (TProd
(TArrow (TVar 0) TUnit)
(TArrow TUnit (TSum TUnit (TVar 0)))
)
(TArrow (TArrow (TVar 0) TUnit) TUnit)
)
).
(TArrow TUnit (TSum TUnit (TVar 0))))
(TArrow (TArrow (TVar 0) TUnit) TUnit))).
Proof.
eapply (@binary_soundness Σ);
eauto using FG_stack_closed, CG_stack_closed.
......
This diff is collapsed.
......@@ -12,8 +12,7 @@ Section soundness.
Local Opaque to_heap.
Lemma wp_basic_soundness e e' τ :
( H H' Δ (HΔ : ctx_PersistentP Δ),
@bin_log_related Σ H H' Δ [] e e' τ)
( `{heapIG Σ, cfgSG Σ} Δ (HΔ : ctx_PersistentP Δ), Δ [] e log e' : τ)
ownP (Σ:=globalF Σ)
WP e {{ _, thp' h v, rtc step ([e'], ) (# v :: thp', h) }}.
Proof.
......@@ -63,7 +62,7 @@ Section soundness.
Qed.
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)
( thp' hp' v', rtc step ([e'], ) (# v' :: thp', hp')).
Proof.
......@@ -81,7 +80,7 @@ Section soundness.
Lemma binary_soundness Γ e 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' τ.
Proof.
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