Commit 89ac9076 authored by Amin Timany's avatar Amin Timany

Close binary soundness lemma for Fμ,ref,par

parent a17bf389
...@@ -199,4 +199,93 @@ Definition context_refines Γ e e' τ := ...@@ -199,4 +199,93 @@ Definition context_refines Γ e e' τ :=
typed_context K Γ τ [] TUnit typed_context K Γ τ [] TUnit
thp h v, rtc step ([fill_ctx K e], ) ((# v) :: thp, h) thp h v, rtc step ([fill_ctx K e], ) ((# v) :: thp, h)
thp' h' v', thp' h' v',
rtc step ([fill_ctx K e'], ) ((# v') :: thp', h'). rtc step ([fill_ctx K e'], ) ((# v') :: thp', h').
\ No newline at end of file
Section bin_log_related_under_typed_context.
Context {Σ : gFunctors}
{iI : heapIG Σ} {iS : cfgSG Σ}
{N : namespace}.
Lemma bin_log_related_under_typed_context Γ e e' τ Γ' τ' K :
( f, e.[iter (List.length Γ) up f] = e)
( f, e'.[iter (List.length Γ) up f] = e')
typed_context K Γ τ Γ' τ'
( Δ {HΔ : context_interp_Persistent Δ},
@bin_log_related _ _ _ N Δ Γ e e' τ HΔ)
Δ {HΔ : context_interp_Persistent Δ},
@bin_log_related _ _ _ N Δ Γ' (fill_ctx K e) (fill_ctx K e') τ' HΔ.
Proof.
revert Γ τ Γ' τ' e e'.
induction K as [|k K]=> Γ τ Γ' τ' e e' H1 H2; simpl.
- inversion_clear 1; trivial.
- inversion_clear 1 as [|? ? ? ? ? ? ? ? Hx1 Hx2]. intros H3 Δ HΔ.
specialize (IHK _ _ _ _ e e' H1 H2 Hx2 H3).
inversion Hx1; subst; simpl.
+ eapply typed_binary_interp_Lam; eauto;
match goal with
H : _ |- _ => eapply (typed_context_n_closed _ _ _ _ _ _ _ H)
end.
+ eapply typed_binary_interp_App; eauto using typed_binary_interp.
+ eapply typed_binary_interp_App; eauto using typed_binary_interp.
+ eapply typed_binary_interp_Pair; eauto using typed_binary_interp.
+ eapply typed_binary_interp_Pair; eauto using typed_binary_interp.
+ eapply typed_binary_interp_Fst; eauto.
+ eapply typed_binary_interp_Snd; eauto.
+ eapply typed_binary_interp_InjL; eauto.
+ eapply typed_binary_interp_InjR; eauto.
+ match goal with
H : typed_context_item _ _ _ _ _ |- _ => inversion H; subst
end.
eapply typed_binary_interp_Case;
eauto using typed_binary_interp;
match goal with
H : _ |- _ => eapply (typed_n_closed _ _ _ H)
end.
+ match goal with
H : typed_context_item _ _ _ _ _ |- _ => inversion H; subst
end.
eapply typed_binary_interp_Case;
eauto using typed_binary_interp;
try match goal with
H : _ |- _ => eapply (typed_n_closed _ _ _ H)
end;
match goal with
H : _ |- _ => eapply (typed_context_n_closed _ _ _ _ _ _ _ H)
end.
+ match goal with
H : typed_context_item _ _ _ _ _ |- _ => inversion H; subst
end.
eapply typed_binary_interp_Case;
eauto using typed_binary_interp;
try match goal with
H : _ |- _ => eapply (typed_n_closed _ _ _ H)
end;
match goal with
H : _ |- _ => eapply (typed_context_n_closed _ _ _ _ _ _ _ H)
end.
+ eapply typed_binary_interp_If;
eauto using typed_context_typed, typed_binary_interp.
+ eapply typed_binary_interp_If;
eauto using typed_context_typed, typed_binary_interp.
+ eapply typed_binary_interp_If;
eauto using typed_context_typed, typed_binary_interp.
+ eapply typed_binary_interp_nat_bin_op;
eauto using typed_context_typed, typed_binary_interp.
+ eapply typed_binary_interp_nat_bin_op;
eauto using typed_context_typed, typed_binary_interp.
+ eapply typed_binary_interp_Fold; eauto.
+ eapply typed_binary_interp_Unfold; eauto.
+ eapply typed_binary_interp_TLam; eauto.
+ eapply typed_binary_interp_TApp; trivial.
+ eapply typed_binary_interp_Fork; trivial.
+ eapply typed_binary_interp_Alloc; trivial.
+ eapply typed_binary_interp_Load; trivial.
+ eapply typed_binary_interp_Store; eauto using typed_binary_interp.
+ eapply typed_binary_interp_Store; eauto using typed_binary_interp.
+ eapply typed_binary_interp_CAS; eauto using typed_binary_interp.
+ eapply typed_binary_interp_CAS; eauto using typed_binary_interp.
+ eapply typed_binary_interp_CAS; eauto using typed_binary_interp.
Unshelve. all: trivial.
Qed.
End bin_log_related_under_typed_context.
\ No newline at end of file
...@@ -186,6 +186,9 @@ Section lang_rules. ...@@ -186,6 +186,9 @@ Section lang_rules.
Lemma of_empty_heap : of_heap = . Lemma of_empty_heap : of_heap = .
Proof. unfold of_heap; apply map_eq => i; rewrite !lookup_omap; f_equal. Qed. Proof. unfold of_heap; apply map_eq => i; rewrite !lookup_omap; f_equal. Qed.
Lemma to_empty_heap : to_heap .
Proof. intros i. unfold to_heap. by rewrite lookup_fmap ?lookup_empty. Qed.
Context `{HIGΣ : heapIG Σ}. Context `{HIGΣ : heapIG Σ}.
(** Allocation *) (** Allocation *)
......
This diff is collapsed.
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