Skip to content
Snippets Groups Projects
Commit 5877d6c9 authored by Jacques-Henri Jourdan's avatar Jacques-Henri Jourdan
Browse files

Coq bug 5326 is not solved. We have better notations.

parent f56c3584
No related branches found
No related tags found
No related merge requests found
Pipeline #11858 passed
...@@ -192,8 +192,8 @@ Section code. ...@@ -192,8 +192,8 @@ Section code.
delete [ #1; "g"];; return: ["r"]. delete [ #1; "g"];; return: ["r"].
Lemma mutexguard_derefmut_type ty `{!TyWf ty} : Lemma mutexguard_derefmut_type ty `{!TyWf ty} :
typed_val mutexguard_derefmut (fn (fun '(α, β) => typed_val mutexguard_derefmut
FP_wf [# &uniq{α}(mutexguard β ty)]%T (&uniq{α}ty)%T)). (fn( '(α, β), ; &uniq{α}(mutexguard β ty)) &uniq{α}ty).
Proof. Proof.
intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#". intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#".
iIntros ([α β] ϝ ret arg). inv_vec arg=>g. simpl_subst. iIntros ([α β] ϝ ret arg). inv_vec arg=>g. simpl_subst.
...@@ -234,8 +234,8 @@ Section code. ...@@ -234,8 +234,8 @@ Section code.
Definition mutexguard_deref : val := mutexguard_derefmut. Definition mutexguard_deref : val := mutexguard_derefmut.
Lemma mutexguard_deref_type ty `{!TyWf ty} : Lemma mutexguard_deref_type ty `{!TyWf ty} :
typed_val mutexguard_derefmut (fn (fun '(α, β) => typed_val mutexguard_derefmut
FP_wf [# &shr{α}(mutexguard β ty)]%T (&shr{α}ty)%T)). (fn( '(α, β), ; &shr{α}(mutexguard β ty)) &shr{α}ty).
Proof. Proof.
intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#". intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#".
iIntros ([α β] ϝ ret arg). inv_vec arg=>g. simpl_subst. iIntros ([α β] ϝ ret arg). inv_vec arg=>g. simpl_subst.
......
...@@ -45,8 +45,6 @@ Section ref_functions. ...@@ -45,8 +45,6 @@ Section ref_functions.
letalloc: "r" <-{2} !"x'" in letalloc: "r" <-{2} !"x'" in
delete [ #1; "x"];; return: ["r"]. delete [ #1; "x"];; return: ["r"].
(* FIXME : using λ instead of fun triggers an anomaly.
See: https://coq.inria.fr/bugs/show_bug.cgi?id=5326 *)
Lemma ref_clone_type ty `{!TyWf ty} : Lemma ref_clone_type ty `{!TyWf ty} :
typed_val ref_clone (fn( '(α, β), ; &shr{α}(ref β ty)) ref β ty). typed_val ref_clone (fn( '(α, β), ; &shr{α}(ref β ty)) ref β ty).
...@@ -110,7 +108,7 @@ Section ref_functions. ...@@ -110,7 +108,7 @@ Section ref_functions.
Lemma ref_deref_type ty `{!TyWf ty} : Lemma ref_deref_type ty `{!TyWf ty} :
typed_val ref_deref typed_val ref_deref
(fn (fun '(α, β) => FP_wf [# &shr{α}(ref β ty)]%T (&shr{α}ty)%T)). (fn( '(α, β), ; &shr{α}(ref β ty)) &shr{α}ty).
Proof. Proof.
intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#". intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#".
iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst. iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst.
......
...@@ -19,8 +19,7 @@ Section refmut_functions. ...@@ -19,8 +19,7 @@ Section refmut_functions.
delete [ #1; "x"];; return: ["r"]. delete [ #1; "x"];; return: ["r"].
Lemma refmut_deref_type ty `{!TyWf ty} : Lemma refmut_deref_type ty `{!TyWf ty} :
typed_val refmut_deref (fn (fun '(α, β) => typed_val refmut_deref (fn( '(α, β), ; &shr{α}(refmut β ty)) &shr{α}ty).
FP_wf [# &shr{α}(refmut β ty)]%T (&shr{α}ty))).
Proof. Proof.
intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#". intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#".
iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst. iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst.
...@@ -57,9 +56,9 @@ Section refmut_functions. ...@@ -57,9 +56,9 @@ Section refmut_functions.
Definition refmut_derefmut : val := refmut_deref. Definition refmut_derefmut : val := refmut_deref.
Lemma refmut_derefmut_type ty `{!TyWf ty} : Lemma refmut_derefmut_type ty `{!TyWf ty} :
typed_val refmut_derefmut (fn (fun '(α, β) => typed_val refmut_derefmut
FP_wf [# &uniq{α}(refmut β ty)]%T (&uniq{α}ty)%T)). (fn( '(α, β), ; &uniq{α}(refmut β ty)) &uniq{α}ty).
Proof. Proof.
intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#". intros E L. iApply type_fn; [solve_typing..|]. iIntros "/= !#".
iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst. iIntros ([α β] ϝ ret arg). inv_vec arg=>x. simpl_subst.
iApply type_deref; [solve_typing..|]. iIntros (x'). iApply type_deref; [solve_typing..|]. iIntros (x').
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment