Commit 03ad2ac9 authored by Ralf Jung's avatar Ralf Jung

bump Iris, fix for gen_heap supporting heap metadata

parent 4f20e572
...@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"] ...@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
install: [make "install"] install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"] remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
depends: [ depends: [
"coq-iris" { (= "dev.2019-06-09.3.31bf88ff") | (= "dev") } "coq-iris" { (= "dev.2019-06-10.2.47f304f6") | (= "dev") }
"coq-autosubst" { = "dev.coq86" } "coq-autosubst" { = "dev.coq86" }
] ]
...@@ -65,7 +65,7 @@ Section lang_rules. ...@@ -65,7 +65,7 @@ Section lang_rules.
iApply wp_lift_atomic_head_step_no_fork; auto. iApply wp_lift_atomic_head_step_no_fork; auto.
iIntros (σ1 ???) "Hσ !>"; iSplit; first by auto. iIntros (σ1 ???) "Hσ !>"; iSplit; first by auto.
iNext; iIntros (v2 σ2 efs Hstep); inv_head_step. iNext; iIntros (v2 σ2 efs Hstep); inv_head_step.
iMod (@gen_heap_alloc with "Hσ") as "[Hσ Hl]"; first done. iMod (@gen_heap_alloc with "Hσ") as "(Hσ & Hl & _)"; first done.
iModIntro; iSplit=> //. iFrame. by iApply "HΦ". iModIntro; iSplit=> //. iFrame. by iApply "HΦ".
Qed. Qed.
......
...@@ -16,10 +16,9 @@ Proof. ...@@ -16,10 +16,9 @@ Proof.
intros Hlog ??. cut (adequate NotStuck e σ (λ _ _, True)); first (intros [_ ?]; eauto). intros Hlog ??. cut (adequate NotStuck e σ (λ _ _, True)); first (intros [_ ?]; eauto).
eapply (wp_adequacy Σ _); eauto. eapply (wp_adequacy Σ _); eauto.
iIntros (Hinv ?). iIntros (Hinv ?).
iMod (own_alloc ( to_gen_heap σ)) as (γ) "Hh". iMod (gen_heap_init σ) as (Hheap) "Hh".
{ by apply auth_auth_valid, to_gen_heap_valid. } iModIntro. iExists (λ σ _, gen_heap_ctx σ); iFrame.
iModIntro. iExists (λ σ _, own γ ( to_gen_heap σ)); iFrame. set (HeapΣ := (HeapG Σ Hinv Hheap)).
set (HeapΣ := (HeapG Σ Hinv (GenHeapG _ _ Σ _ _ _ γ))).
iApply (wp_wand with "[]"). iApply (wp_wand with "[]").
- replace e with e.[env_subst[]] by by asimpl. - replace e with e.[env_subst[]] by by asimpl.
iApply (Hlog HeapΣ [] []). iApply (@interp_env_nil _ HeapΣ). iApply (Hlog HeapΣ [] []). iApply (@interp_env_nil _ HeapΣ).
......
...@@ -15,8 +15,7 @@ Proof. ...@@ -15,8 +15,7 @@ Proof.
{ destruct 1; naive_solver. } { destruct 1; naive_solver. }
eapply (wp_adequacy Σ); first by apply _. eapply (wp_adequacy Σ); first by apply _.
iIntros (Hinv ?). iIntros (Hinv ?).
iMod (own_alloc ( to_gen_heap )) as (γ) "Hh". iMod (gen_heap_init (: state)) as (Hheap) "Hh".
{ by apply auth_auth_valid, to_gen_heap_valid. }
iMod (own_alloc ( (Excl' e', ) iMod (own_alloc ( (Excl' e', )
((Excl' e', ) : cfgUR))) as (γc) "[Hcfg1 Hcfg2]". ((Excl' e', ) : cfgUR))) as (γc) "[Hcfg1 Hcfg2]".
{ apply auth_both_valid. split=>//. } { apply auth_both_valid. split=>//. }
...@@ -25,8 +24,8 @@ Proof. ...@@ -25,8 +24,8 @@ Proof.
{ iNext. iExists e', . iSplit; eauto. { iNext. iExists e', . iSplit; eauto.
rewrite /to_gen_heap fin_maps.map_fmap_empty. rewrite /to_gen_heap fin_maps.map_fmap_empty.
iFrame. } iFrame. }
set (HeapΣ := HeapG Σ Hinv (GenHeapG _ _ Σ _ _ _ γ)). set (HeapΣ := HeapG Σ Hinv Hheap).
iExists (λ σ _, own γ ( to_gen_heap σ)); iFrame. iExists (λ σ _, gen_heap_ctx σ); iFrame.
iApply wp_fupd. iApply (wp_wand with "[-]"). iApply wp_fupd. iApply (wp_wand with "[-]").
- iPoseProof (Hlog _ _ with "[$Hcfg]") as "Hrel". - iPoseProof (Hlog _ _ with "[$Hcfg]") as "Hrel".
{ iApply (@logrel_binary.interp_env_nil Σ HeapΣ). } { iApply (@logrel_binary.interp_env_nil Σ HeapΣ). }
......
...@@ -60,7 +60,7 @@ Section lang_rules. ...@@ -60,7 +60,7 @@ Section lang_rules.
iIntros (<- Φ) "_ HΦ". iApply wp_lift_atomic_head_step_no_fork; auto. iIntros (<- Φ) "_ HΦ". iApply wp_lift_atomic_head_step_no_fork; auto.
iIntros (σ1 ???) "Hσ !>"; iSplit; first by auto. iIntros (σ1 ???) "Hσ !>"; iSplit; first by auto.
iNext; iIntros (v2 σ2 efs Hstep); inv_head_step. iNext; iIntros (v2 σ2 efs Hstep); inv_head_step.
iMod (@gen_heap_alloc with "Hσ") as "[Hσ Hl]"; first done. iMod (@gen_heap_alloc with "Hσ") as "(Hσ & Hl & _)"; first done.
iModIntro; iSplit=> //. iFrame. by iApply "HΦ". iModIntro; iSplit=> //. iFrame. by iApply "HΦ".
Qed. Qed.
......
...@@ -14,16 +14,15 @@ Proof. ...@@ -14,16 +14,15 @@ Proof.
cut (adequate NotStuck e (λ _ _, thp' h v, rtc erased_step ([e'], ) (of_val v :: thp', h))). cut (adequate NotStuck e (λ _ _, thp' h v, rtc erased_step ([e'], ) (of_val v :: thp', h))).
{ destruct 1; naive_solver. } { destruct 1; naive_solver. }
eapply (wp_adequacy Σ _); iIntros (Hinv ?). eapply (wp_adequacy Σ _); iIntros (Hinv ?).
iMod (own_alloc ( to_gen_heap )) as (γ) "Hh". iMod (gen_heap_init (: state)) as (Hheap) "Hh".
{ by apply auth_auth_valid, to_gen_heap_valid. }
iMod (own_alloc ( (to_tpool [e'], ) iMod (own_alloc ( (to_tpool [e'], )
((to_tpool [e'] : tpoolUR, ) : cfgUR))) as (γc) "[Hcfg1 Hcfg2]". ((to_tpool [e'] : tpoolUR, ) : cfgUR))) as (γc) "[Hcfg1 Hcfg2]".
{ apply auth_both_valid. split=>//. split=>//. apply to_tpool_valid. } { apply auth_both_valid. split=>//. split=>//. apply to_tpool_valid. }
set (Hcfg := CFGSG _ _ γc). set (Hcfg := CFGSG _ _ γc).
iMod (inv_alloc specN _ (spec_inv ([e'], )) with "[Hcfg1]") as "#Hcfg". iMod (inv_alloc specN _ (spec_inv ([e'], )) with "[Hcfg1]") as "#Hcfg".
{ iNext. iExists [e'], . rewrite /to_gen_heap fin_maps.map_fmap_empty. auto. } { iNext. iExists [e'], . rewrite /to_gen_heap fin_maps.map_fmap_empty. auto. }
set (HeapΣ := (HeapIG Σ Hinv (GenHeapG _ _ Σ _ _ _ γ))). set (HeapΣ := (HeapIG Σ Hinv Hheap)).
iExists (λ σ _, own γ ( to_gen_heap σ)); iFrame. iExists (λ σ _, gen_heap_ctx σ); iFrame.
iApply wp_fupd. iApply wp_wand_r. iApply wp_fupd. iApply wp_wand_r.
iSplitL. iSplitL.
iPoseProof ((Hlog _ _ [] []) with "[]") as "Hrel". iPoseProof ((Hlog _ _ [] []) with "[]") as "Hrel".
......
...@@ -15,10 +15,9 @@ Theorem soundness Σ `{heapPreIG Σ} e τ e' thp σ σ' : ...@@ -15,10 +15,9 @@ Theorem soundness Σ `{heapPreIG Σ} e τ e' thp σ σ' :
Proof. Proof.
intros Hlog ??. cut (adequate NotStuck e σ (λ _ _, True)); first (intros [_ ?]; eauto). intros Hlog ??. cut (adequate NotStuck e σ (λ _ _, True)); first (intros [_ ?]; eauto).
eapply (wp_adequacy Σ _). iIntros (Hinv ?). eapply (wp_adequacy Σ _). iIntros (Hinv ?).
iMod (own_alloc ( to_gen_heap σ)) as (γ) "Hh". iMod (gen_heap_init σ) as (Hheap) "Hh".
{ by apply auth_auth_valid, to_gen_heap_valid. } iModIntro. iExists (λ σ _, gen_heap_ctx σ); iFrame.
iModIntro. iExists (λ σ _, own γ ( to_gen_heap σ)); iFrame. set (HeapΣ := (HeapIG Σ Hinv Hheap)).
set (HeapΣ := (HeapIG Σ Hinv (GenHeapG _ _ Σ _ _ _ γ))).
iApply (wp_wand with "[]"). iApply (wp_wand with "[]").
- replace e with e.[env_subst[]] by by asimpl. - replace e with e.[env_subst[]] by by asimpl.
iApply (Hlog HeapΣ [] []). iApply (@interp_env_nil _ HeapΣ). iApply (Hlog HeapΣ [] []). iApply (@interp_env_nil _ HeapΣ).
......
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