Skip to content
Snippets Groups Projects
Commit 288bda11 authored by Jonas Kastberg's avatar Jonas Kastberg
Browse files

Updated typing rules to algorithmic typing

parent 86314340
No related branches found
No related tags found
No related merge requests found
Pipeline #33703 passed
...@@ -104,8 +104,8 @@ Section rules. ...@@ -104,8 +104,8 @@ Section rules.
Context `{heapG Σ, lockG Σ}. Context `{heapG Σ, lockG Σ}.
(** Mutex properties *) (** Mutex properties *)
Lemma ltyped_mutex_alloc A : Lemma ltyped_mutex_alloc Γ A :
mutex_alloc : A mutex A. Γ mutex_alloc : A mutex A .
Proof. Proof.
iIntros (vs) "!> HΓ /=". iApply wp_value. iIntros (vs) "!> HΓ /=". iApply wp_value.
iSplitL; last by iApply env_ltyped_empty. iSplitL; last by iApply env_ltyped_empty.
......
...@@ -216,8 +216,8 @@ Section properties. ...@@ -216,8 +216,8 @@ Section properties.
Qed. Qed.
(** Sum Properties *) (** Sum Properties *)
Lemma ltyped_injl Γ e A1 A2 : Lemma ltyped_injl Γ1 Γ2 e A1 A2 :
(Γ e : A1) -∗ Γ InjL e : A1 + A2. (Γ1 e : A1 Γ2) -∗ Γ1 InjL e : A1 + A2 Γ2.
Proof. Proof.
iIntros "#HA" (vs) "!> HΓ /=". iIntros "#HA" (vs) "!> HΓ /=".
wp_apply (wp_wand with "(HA [HΓ //])"). wp_apply (wp_wand with "(HA [HΓ //])").
...@@ -225,8 +225,8 @@ Section properties. ...@@ -225,8 +225,8 @@ Section properties.
iLeft. iExists v. auto. iLeft. iExists v. auto.
Qed. Qed.
Lemma ltyped_injr Γ e A1 A2 : Lemma ltyped_injr Γ1 Γ2 e A1 A2 :
(Γ e : A2) -∗ Γ InjR e : A1 + A2. (Γ1 e : A2 Γ2) -∗ Γ1 InjR e : A1 + A2 Γ2.
Proof. Proof.
iIntros "#HA" (vs) "!> HΓ /=". iIntros "#HA" (vs) "!> HΓ /=".
wp_apply (wp_wand with "(HA [HΓ //])"). wp_apply (wp_wand with "(HA [HΓ //])").
...@@ -276,8 +276,8 @@ Section properties. ...@@ -276,8 +276,8 @@ Section properties.
Qed. Qed.
(** Existential properties *) (** Existential properties *)
Lemma ltyped_pack Γ e k (C : lty Σ k ltty Σ) M : Lemma ltyped_pack Γ1 Γ2 e k (C : lty Σ k ltty Σ) M :
(Γ e : C M) -∗ Γ e : M, C M. (Γ1 e : C M Γ2) -∗ Γ1 e : M, C M Γ2.
Proof. Proof.
iIntros "#He" (vs) "!> HΓ /=". iIntros "#He" (vs) "!> HΓ /=".
wp_apply (wp_wand with "(He [HΓ //])"); iIntros (w) "[HB $]". by iExists M. wp_apply (wp_wand with "(He [HΓ //])"); iIntros (w) "[HB $]". by iExists M.
...@@ -454,8 +454,8 @@ Section properties. ...@@ -454,8 +454,8 @@ Section properties.
Section with_chan. Section with_chan.
Context `{chanG Σ}. Context `{chanG Σ}.
Lemma ltyped_new_chan S : Lemma ltyped_new_chan Γ S :
new_chan : () (chan S * chan (lty_dual S)). Γ new_chan : () (chan S * chan (lty_dual S)) .
Proof. Proof.
iIntros (vs) "!> HΓ /=". iApply wp_value. iIntros (vs) "!> HΓ /=". iApply wp_value.
iSplitL; last by iApply env_ltyped_empty. iSplitL; last by iApply env_ltyped_empty.
......
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