Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Iris
examples
Commits
43d7f211
Commit
43d7f211
authored
May 24, 2019
by
Hai Dang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'hai/auth_frac' into 'master'
Bump Iris with changes in `auth` See merge request
!17
parents
3e8fcd4c
ffb27f4a
Pipeline
#16941
passed with stage
in 11 minutes and 11 seconds
Changes
19
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
72 additions
and
69 deletions
+72
-69
opam
opam
+1
-1
theories/hocap/contrib_bag.v
theories/hocap/contrib_bag.v
+1
-1
theories/lecture_notes/ccounter.v
theories/lecture_notes/ccounter.v
+1
-1
theories/lecture_notes/coq_intro_example_2.v
theories/lecture_notes/coq_intro_example_2.v
+5
-5
theories/logatom/elimination_stack/hocap_spec.v
theories/logatom/elimination_stack/hocap_spec.v
+3
-3
theories/logatom/elimination_stack/stack.v
theories/logatom/elimination_stack/stack.v
+6
-6
theories/logatom/flat_combiner/misc.v
theories/logatom/flat_combiner/misc.v
+1
-1
theories/logatom/snapshot/atomic_snapshot.v
theories/logatom/snapshot/atomic_snapshot.v
+4
-4
theories/logatom/treiber2.v
theories/logatom/treiber2.v
+3
-2
theories/logrel/F_mu_ref/rules_binary.v
theories/logrel/F_mu_ref/rules_binary.v
+7
-7
theories/logrel/F_mu_ref/soundness.v
theories/logrel/F_mu_ref/soundness.v
+1
-1
theories/logrel/F_mu_ref/soundness_binary.v
theories/logrel/F_mu_ref/soundness_binary.v
+4
-4
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
+1
-1
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
+2
-2
theories/logrel/F_mu_ref_conc/rules_binary.v
theories/logrel/F_mu_ref_conc/rules_binary.v
+13
-12
theories/logrel/F_mu_ref_conc/soundness_binary.v
theories/logrel/F_mu_ref_conc/soundness_binary.v
+3
-3
theories/logrel/F_mu_ref_conc/soundness_unary.v
theories/logrel/F_mu_ref_conc/soundness_unary.v
+1
-1
theories/logrel_heaplang/lib/symbol_adt.v
theories/logrel_heaplang/lib/symbol_adt.v
+6
-3
theories/spanning_tree/mon.v
theories/spanning_tree/mon.v
+9
-11
No files found.
opam
View file @
43d7f211
...
@@ -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-0
4-17.0.60d28bbb
") | (= "dev") }
"coq-iris" { (= "dev.2019-0
5-24.0.c9984c7f
") | (= "dev") }
"coq-autosubst" { = "dev.coq86" }
"coq-autosubst" { = "dev.coq86" }
]
]
theories/hocap/contrib_bag.v
View file @
43d7f211
...
@@ -50,7 +50,7 @@ Section proof.
...
@@ -50,7 +50,7 @@ Section proof.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
iApply
(
newBag_spec
b
NB
)
;
eauto
.
iApply
(
newBag_spec
b
NB
)
;
eauto
.
iNext
.
iIntros
(
v
γ
b
)
"[#Hbag Hcntn]"
.
iNext
.
iIntros
(
v
γ
b
)
"[#Hbag Hcntn]"
.
iMod
(
own_alloc
(
●
!
∅
⋅
◯
!
∅
))
as
(
γ
)
"[Hown Hpart]"
;
first
done
.
iMod
(
own_alloc
(
●
!
∅
⋅
◯
!
∅
))
as
(
γ
)
"[Hown Hpart]"
;
first
by
apply
auth_both_valid
.
iMod
(
inv_alloc
NI
_
(
∃
X
,
bag_contents
b
γ
b
X
∗
own
γ
(
●
!
X
))%
I
with
"[Hcntn Hown]"
)
as
"#Hinv"
.
iMod
(
inv_alloc
NI
_
(
∃
X
,
bag_contents
b
γ
b
X
∗
own
γ
(
●
!
X
))%
I
with
"[Hcntn Hown]"
)
as
"#Hinv"
.
{
iNext
.
iExists
_
.
iFrame
.
}
{
iNext
.
iExists
_
.
iFrame
.
}
iApply
"HΦ"
.
iModIntro
.
iExists
_
,
_
.
iFrame
"Hinv Hbag Hpart"
.
iApply
"HΦ"
.
iModIntro
.
iExists
_
,
_
.
iFrame
"Hinv Hbag Hpart"
.
...
...
theories/lecture_notes/ccounter.v
View file @
43d7f211
...
@@ -58,7 +58,7 @@ Section ccounter.
...
@@ -58,7 +58,7 @@ Section ccounter.
iIntros
(
Φ
)
"_ HΦ"
.
rewrite
-
wp_fupd
.
iIntros
(
Φ
)
"_ HΦ"
.
rewrite
-
wp_fupd
.
wp_apply
newcounter_spec
;
auto
.
wp_apply
newcounter_spec
;
auto
.
iIntros
(
ℓ
)
"H"
;
iDestruct
"H"
as
(
γ₂
)
"[#HCnt Hown]"
.
iIntros
(
ℓ
)
"H"
;
iDestruct
"H"
as
(
γ₂
)
"[#HCnt Hown]"
.
iMod
(
own_alloc
(
●
!
m
%
nat
⋅
◯
!
m
%
nat
))
as
(
γ₁
)
"[Hγ Hγ']"
;
first
done
.
iMod
(
own_alloc
(
●
!
m
%
nat
⋅
◯
!
m
%
nat
))
as
(
γ₁
)
"[Hγ Hγ']"
;
first
by
apply
auth_both_valid
.
iMod
(
inv_alloc
(
N
.@
"counter"
)
_
(
ccounter_inv
γ₁
γ₂
)
with
"[Hγ Hown]"
).
iMod
(
inv_alloc
(
N
.@
"counter"
)
_
(
ccounter_inv
γ₁
γ₂
)
with
"[Hγ Hown]"
).
{
iNext
.
iExists
_
.
by
iFrame
.
}
{
iNext
.
iExists
_
.
by
iFrame
.
}
iModIntro
.
iApply
"HΦ"
.
rewrite
/
is_ccounter
;
eauto
.
iModIntro
.
iApply
"HΦ"
.
rewrite
/
is_ccounter
;
eauto
.
...
...
theories/lecture_notes/coq_intro_example_2.v
View file @
43d7f211
...
@@ -29,7 +29,7 @@ Section monotone_counter.
...
@@ -29,7 +29,7 @@ Section monotone_counter.
algebra we shall be using. The Iris library contains all the ingredients
algebra we shall be using. The Iris library contains all the ingredients
needed to compose this particular resource algebra from simpler components,
needed to compose this particular resource algebra from simpler components,
however to illustrate how to define our own we will define it from scratch.
however to illustrate how to define our own we will define it from scratch.
In the subsequent section we show how to obtain an equivalent resource
In the subsequent section we show how to obtain an equivalent resource
algebra from the building blocks provided by the Iris Coq library.
algebra from the building blocks provided by the Iris Coq library.
*)
*)
...
@@ -423,7 +423,7 @@ Section monotone_counter'.
...
@@ -423,7 +423,7 @@ Section monotone_counter'.
Proof
.
Proof
.
(* Use a simplified definition of validity for when the underlying CMRA is discrete, i.e., an RA.
(* Use a simplified definition of validity for when the underlying CMRA is discrete, i.e., an RA.
The general definition also involves the use of step-indices, which is not needed in our case. *)
The general definition also involves the use of step-indices, which is not needed in our case. *)
rewrite
auth_valid
_discrete_2
.
rewrite
auth_
both_
valid
.
split
.
split
.
-
intros
[?
_
]
;
by
apply
mnat_included
.
-
intros
[?
_
]
;
by
apply
mnat_included
.
-
intros
?%
mnat_included
;
done
.
-
intros
?%
mnat_included
;
done
.
...
@@ -460,7 +460,7 @@ Section monotone_counter'.
...
@@ -460,7 +460,7 @@ Section monotone_counter'.
iIntros
(
Φ
)
"_ HCont"
.
iIntros
(
Φ
)
"_ HCont"
.
rewrite
/
newCounter
-
wp_fupd
.
rewrite
/
newCounter
-
wp_fupd
.
wp_lam
.
wp_lam
.
iMod
(
own_alloc
(
●
(
0
%
nat
:
mnatUR
)
⋅
◯
0
%
nat
))
as
(
γ
)
"[HAuth HFrac]"
.
iMod
(
own_alloc
(
●
(
0
%
nat
:
mnatUR
)
⋅
◯
(
0
%
nat
:
mnatUR
)
))
as
(
γ
)
"[HAuth HFrac]"
.
-
apply
mcounterRA_valid_auth_frag'
;
auto
.
-
apply
mcounterRA_valid_auth_frag'
;
auto
.
-
wp_alloc
ℓ
as
"Hpt"
.
-
wp_alloc
ℓ
as
"Hpt"
.
iMod
(
inv_alloc
N
_
(
counter_inv'
ℓ
γ
)
with
"[Hpt HAuth]"
)
as
"HInv"
.
iMod
(
inv_alloc
N
_
(
counter_inv'
ℓ
γ
)
with
"[Hpt HAuth]"
)
as
"HInv"
.
...
@@ -505,7 +505,7 @@ Section monotone_counter'.
...
@@ -505,7 +505,7 @@ Section monotone_counter'.
iInv
N
as
(
k
)
">[Hpt HOwnAuth]"
"HClose"
.
iInv
N
as
(
k
)
">[Hpt HOwnAuth]"
"HClose"
.
destruct
(
decide
(
k
=
m
))
;
subst
.
destruct
(
decide
(
k
=
m
))
;
subst
.
+
wp_cas_suc
.
+
wp_cas_suc
.
iMod
(
own_update
γ
((
●
m
⋅
◯
n
))
(
●
(
S
m
:
mnatUR
)
⋅
(
◯
S
n
))
with
"[HOwnFrag HOwnAuth]"
)
as
"[HOwnAuth HOwnFrag]"
.
iMod
(
own_update
γ
((
●
m
⋅
◯
n
))
(
●
(
S
m
:
mnatUR
)
⋅
(
◯
(
S
n
:
mnatUR
)
))
with
"[HOwnFrag HOwnAuth]"
)
as
"[HOwnAuth HOwnFrag]"
.
{
apply
mcounterRA_update'
.
}
{
apply
mcounterRA_update'
.
}
{
rewrite
own_op
;
iFrame
.
}
{
rewrite
own_op
;
iFrame
.
}
iMod
(
"HClose"
with
"[Hpt HOwnAuth]"
)
as
"_"
.
iMod
(
"HClose"
with
"[Hpt HOwnAuth]"
)
as
"_"
.
...
@@ -606,7 +606,7 @@ Section ccounter.
...
@@ -606,7 +606,7 @@ Section ccounter.
{{{
γ
ℓ
,
RET
#
ℓ
;
is_ccounter
γ
ℓ
1
0
%
nat
}}}.
{{{
γ
ℓ
,
RET
#
ℓ
;
is_ccounter
γ
ℓ
1
0
%
nat
}}}.
Proof
.
Proof
.
iIntros
(
Φ
)
"_ HΦ"
.
rewrite
-
wp_fupd
/
newCounter
/=.
wp_lam
.
wp_alloc
ℓ
as
"Hpt"
.
iIntros
(
Φ
)
"_ HΦ"
.
rewrite
-
wp_fupd
/
newCounter
/=.
wp_lam
.
wp_alloc
ℓ
as
"Hpt"
.
iMod
(
own_alloc
(
●
!
O
%
nat
⋅
◯
!
0
%
nat
))
as
(
γ
)
"[Hγ Hγ']"
;
first
done
.
iMod
(
own_alloc
(
●
!
O
%
nat
⋅
◯
!
0
%
nat
))
as
(
γ
)
"[Hγ Hγ']"
;
first
by
apply
auth_both_valid
.
iMod
(
inv_alloc
N
_
(
ccounter_inv
γ
ℓ
)
with
"[Hpt Hγ]"
).
iMod
(
inv_alloc
N
_
(
ccounter_inv
γ
ℓ
)
with
"[Hpt Hγ]"
).
{
iNext
.
iExists
0
%
nat
.
by
iFrame
.
}
{
iNext
.
iExists
0
%
nat
.
by
iFrame
.
}
iModIntro
.
iApply
"HΦ"
.
rewrite
/
is_ccounter
;
eauto
.
iModIntro
.
iApply
"HΦ"
.
rewrite
/
is_ccounter
;
eauto
.
...
...
theories/logatom/elimination_stack/hocap_spec.v
View file @
43d7f211
...
@@ -165,7 +165,7 @@ Section logatom_hocap.
...
@@ -165,7 +165,7 @@ Section logatom_hocap.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
iApply
logatom
.
new_stack_spec
;
first
done
.
iIntros
(
Φ
)
"_ HΦ"
.
iApply
wp_fupd
.
iApply
logatom
.
new_stack_spec
;
first
done
.
iIntros
"!>"
(
γ
s
s
)
"[Hstack Hcont]"
.
iIntros
"!>"
(
γ
s
s
)
"[Hstack Hcont]"
.
iMod
(
own_alloc
(
●
Excl'
[]
⋅
◯
Excl'
[]))
as
(
γ
w
)
"[Hs● Hs◯]"
.
iMod
(
own_alloc
(
●
Excl'
[]
⋅
◯
Excl'
[]))
as
(
γ
w
)
"[Hs● Hs◯]"
.
{
apply
auth_valid
_discrete_2
.
split
;
done
.
}
{
apply
auth_
both_
valid
.
split
;
done
.
}
iApply
(
"HΦ"
$!
(
γ
s
,
γ
w
)).
rewrite
/
hocap_is_stack
.
iFrame
.
iApply
(
"HΦ"
$!
(
γ
s
,
γ
w
)).
rewrite
/
hocap_is_stack
.
iFrame
.
iApply
inv_alloc
.
eauto
with
iFrame
.
iApply
inv_alloc
.
eauto
with
iFrame
.
Qed
.
Qed
.
...
@@ -212,11 +212,11 @@ Section logatom_hocap.
...
@@ -212,11 +212,11 @@ Section logatom_hocap.
iIntros
(???)
"Hf1 Hf2"
.
iDestruct
(
own_valid_2
with
"Hf1 Hf2"
)
as
%[].
iIntros
(???)
"Hf1 Hf2"
.
iDestruct
(
own_valid_2
with
"Hf1 Hf2"
)
as
%[].
Qed
.
Qed
.
Next
Obligation
.
Next
Obligation
.
iIntros
(???)
"Ha1 Ha2"
.
iDestruct
(
own_valid_2
with
"Ha1 Ha2"
)
as
%[].
iIntros
(???)
"Ha1 Ha2"
.
by
iDestruct
(
own_valid_2
with
"Ha1 Ha2"
)
as
%[].
Qed
.
Qed
.
Next
Obligation
.
Next
Obligation
.
iIntros
(???)
"Hf Ha"
.
iDestruct
(
own_valid_2
with
"Ha Hf"
)
as
iIntros
(???)
"Hf Ha"
.
iDestruct
(
own_valid_2
with
"Ha Hf"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
done
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
done
.
Qed
.
Qed
.
Next
Obligation
.
Next
Obligation
.
iIntros
(???)
"Hf Ha"
.
iMod
(
own_update_2
with
"Ha Hf"
)
as
"[? ?]"
.
iIntros
(???)
"Hf Ha"
.
iMod
(
own_update_2
with
"Ha Hf"
)
as
"[? ?]"
.
...
...
theories/logatom/elimination_stack/stack.v
View file @
43d7f211
...
@@ -175,7 +175,7 @@ Section stack.
...
@@ -175,7 +175,7 @@ Section stack.
wp_apply
alloc_spec
;
first
done
.
iIntros
(
head
)
"Hhead"
.
wp_let
.
wp_apply
alloc_spec
;
first
done
.
iIntros
(
head
)
"Hhead"
.
wp_let
.
wp_apply
alloc_spec
;
first
done
.
iIntros
(
offer
)
"Hoffer"
.
wp_let
.
wp_apply
alloc_spec
;
first
done
.
iIntros
(
offer
)
"Hoffer"
.
wp_let
.
iMod
(
own_alloc
(
●
Excl'
[]
⋅
◯
Excl'
[]))
as
(
γ
s
)
"[Hs● Hs◯]"
.
iMod
(
own_alloc
(
●
Excl'
[]
⋅
◯
Excl'
[]))
as
(
γ
s
)
"[Hs● Hs◯]"
.
{
apply
auth_valid
_discrete_2
.
split
;
done
.
}
{
apply
auth_
both_
valid
.
split
;
done
.
}
iMod
(
inv_alloc
stackN
_
(
stack_inv
γ
s
head
offer
)
with
"[-HΦ Hs◯]"
).
iMod
(
inv_alloc
stackN
_
(
stack_inv
γ
s
head
offer
)
with
"[-HΦ Hs◯]"
).
{
iNext
.
iExists
None
,
None
,
_
.
iFrame
.
done
.
}
{
iNext
.
iExists
None
,
None
,
_
.
iFrame
.
done
.
}
wp_pures
.
iApply
"HΦ"
.
iFrame
"Hs◯"
.
iModIntro
.
iExists
_
,
_
.
auto
.
wp_pures
.
iApply
"HΦ"
.
iFrame
"Hs◯"
.
iModIntro
.
iExists
_
,
_
.
auto
.
...
@@ -209,7 +209,7 @@ Section stack.
...
@@ -209,7 +209,7 @@ Section stack.
-
(* The CAS succeeded. Update everything accordingly. *)
-
(* The CAS succeeded. Update everything accordingly. *)
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
iModIntro
.
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
iModIntro
.
...
@@ -283,7 +283,7 @@ Section stack.
...
@@ -283,7 +283,7 @@ Section stack.
iDestruct
"Hlist"
as
">%"
.
subst
stack_rep
.
iDestruct
"Hlist"
as
">%"
.
subst
stack_rep
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
iSplitR
"HΦ"
;
first
by
eauto
10
with
iFrame
.
iSplitR
"HΦ"
;
first
by
eauto
10
with
iFrame
.
iIntros
"!>"
.
wp_pures
.
by
iApply
"HΦ"
.
iIntros
"!>"
.
wp_pures
.
by
iApply
"HΦ"
.
...
@@ -305,7 +305,7 @@ Section stack.
...
@@ -305,7 +305,7 @@ Section stack.
and we are done. *)
and we are done. *)
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
destruct
l
as
[|
v'
l
]
;
simpl
.
destruct
l
as
[|
v'
l
]
;
simpl
.
{
(* Contradiction. *)
iDestruct
"Hlist"
as
">%"
.
done
.
}
{
(* Contradiction. *)
iDestruct
"Hlist"
as
">%"
.
done
.
}
iDestruct
"Hlist"
as
(
tail'
q'
rep'
)
"[>Heq [>Htail' Hlist]]"
.
iDestruct
"Hlist"
as
(
tail'
q'
rep'
)
"[>Heq [>Htail' Hlist]]"
.
...
@@ -345,13 +345,13 @@ Section stack.
...
@@ -345,13 +345,13 @@ Section stack.
iInv
stackN
as
(
stack_rep
offer_rep
l
)
"(>Hs● & >H↦ & Hlist & Hoff)"
.
iInv
stackN
as
(
stack_rep
offer_rep
l
)
"(>Hs● & >H↦ & Hlist & Hoff)"
.
iMod
"AUoff"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iMod
"AUoff"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
iMod
(
"Hclose"
with
"Hl'"
)
as
"HQoff"
.
iMod
(
"Hclose"
with
"Hl'"
)
as
"HQoff"
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iMod
"AU"
as
(
l'
)
"[Hl' [_ Hclose]]"
.
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
iDestruct
(
own_valid_2
with
"Hs● Hl'"
)
as
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[->%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
iMod
(
own_update_2
with
"Hs● Hl'"
)
as
"[Hs● Hl']"
.
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
{
eapply
auth_update
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
_
)).
done
.
}
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
iMod
(
"Hclose"
with
"Hl'"
)
as
"HΦ"
.
...
...
theories/logatom/flat_combiner/misc.v
View file @
43d7f211
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
From
iris
.
program_logic
Require
Export
weakestpre
.
From
iris
.
program_logic
Require
Export
weakestpre
.
From
iris
.
heap_lang
Require
Export
lang
proofmode
notation
.
From
iris
.
heap_lang
Require
Export
lang
proofmode
notation
.
From
iris
.
algebra
Require
Import
auth
frac
gmap
agree
.
From
iris
.
algebra
Require
Import
excl
auth
frac
gmap
agree
.
From
iris
.
bi
Require
Import
fractional
.
From
iris
.
bi
Require
Import
fractional
.
From
iris
.
base_logic
Require
Import
auth
.
From
iris
.
base_logic
Require
Import
auth
.
...
...
theories/logatom/snapshot/atomic_snapshot.v
View file @
43d7f211
...
@@ -160,11 +160,11 @@ Section atomic_snapshot.
...
@@ -160,11 +160,11 @@ Section atomic_snapshot.
wp_alloc
ly
as
"Hly"
.
wp_alloc
ly
as
"Hly"
.
set
(
Excl'
(
v1
,
v2
))
as
p
.
set
(
Excl'
(
v1
,
v2
))
as
p
.
iMod
(
own_alloc
(
●
p
⋅
◯
p
))
as
(
γ
1
)
"[Hp⚫ Hp◯]"
.
{
iMod
(
own_alloc
(
●
p
⋅
◯
p
))
as
(
γ
1
)
"[Hp⚫ Hp◯]"
.
{
rewrite
/
p
.
apply
auth_valid
_discrete_2
.
split
;
done
.
rewrite
/
p
.
apply
auth_
both_
valid
.
split
;
done
.
}
}
set
(
new_timestamp
0
v1
)
as
t
.
set
(
new_timestamp
0
v1
)
as
t
.
iMod
(
own_alloc
(
●
gmap_to_UR
t
⋅
◯
gmap_to_UR
t
))
as
(
γ
2
)
"[Ht⚫ Ht◯]"
.
{
iMod
(
own_alloc
(
●
gmap_to_UR
t
⋅
◯
gmap_to_UR
t
))
as
(
γ
2
)
"[Ht⚫ Ht◯]"
.
{
rewrite
/
t
/
new_timestamp
.
apply
auth_valid
_discrete_2
.
rewrite
/
t
/
new_timestamp
.
apply
auth_
both_
valid
.
split
;
first
done
.
rewrite
/
gmap_to_UR
map_fmap_singleton
.
apply
singleton_valid
.
done
.
split
;
first
done
.
rewrite
/
gmap_to_UR
map_fmap_singleton
.
apply
singleton_valid
.
done
.
}
}
wp_pures
.
iApply
(
"Hp"
$!
(
γ
1
,
γ
2
)).
wp_pures
.
iApply
(
"Hp"
$!
(
γ
1
,
γ
2
)).
...
@@ -192,7 +192,7 @@ Section atomic_snapshot.
...
@@ -192,7 +192,7 @@ Section atomic_snapshot.
Proof
.
Proof
.
iIntros
"Hγ● Hγ◯"
.
iIntros
"Hγ● Hγ◯"
.
iDestruct
(
own_valid_2
with
"Hγ● Hγ◯"
)
as
iDestruct
(
own_valid_2
with
"Hγ● Hγ◯"
)
as
%[
H
%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
%[
H
%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
done
.
done
.
Qed
.
Qed
.
...
@@ -223,7 +223,7 @@ Section atomic_snapshot.
...
@@ -223,7 +223,7 @@ Section atomic_snapshot.
Proof
.
Proof
.
iIntros
"[Hγ⚫ Hγ◯]"
.
iIntros
"[Hγ⚫ Hγ◯]"
.
iDestruct
(
own_valid_2
with
"Hγ⚫ Hγ◯"
)
as
iDestruct
(
own_valid_2
with
"Hγ⚫ Hγ◯"
)
as
%[
H
Hv
]%
auth_valid
_discrete_2
.
iPureIntro
.
intros
t
x
HT2
.
%[
H
Hv
]%
auth_
both_
valid
.
iPureIntro
.
intros
t
x
HT2
.
pose
proof
(
iffLR
(
lookup_included
(
gmap_to_UR
T2
)
(
gmap_to_UR
T1
))
H
t
)
as
Ht
.
pose
proof
(
iffLR
(
lookup_included
(
gmap_to_UR
T2
)
(
gmap_to_UR
T1
))
H
t
)
as
Ht
.
rewrite
!
lookup_fmap
HT2
/=
in
Ht
.
rewrite
!
lookup_fmap
HT2
/=
in
Ht
.
destruct
(
is_Some_included
_
_
Ht
)
as
[?
[
t2
[
Ht2
->]]%
fmap_Some_1
]
;
first
by
eauto
.
destruct
(
is_Some_included
_
_
Ht
)
as
[?
[
t2
[
Ht2
->]]%
fmap_Some_1
]
;
first
by
eauto
.
...
...
theories/logatom/treiber2.v
View file @
43d7f211
...
@@ -156,7 +156,7 @@ Lemma auth_agree γ xs ys :
...
@@ -156,7 +156,7 @@ Lemma auth_agree γ xs ys :
own
γ
(
●
(
Excl'
xs
))
-
∗
own
γ
(
◯
(
Excl'
ys
))
-
∗
⌜
xs
=
ys
⌝
.
own
γ
(
●
(
Excl'
xs
))
-
∗
own
γ
(
◯
(
Excl'
ys
))
-
∗
⌜
xs
=
ys
⌝
.
Proof
.
Proof
.
iIntros
"Hγ● Hγ◯"
.
by
iDestruct
(
own_valid_2
with
"Hγ● Hγ◯"
)
iIntros
"Hγ● Hγ◯"
.
by
iDestruct
(
own_valid_2
with
"Hγ● Hγ◯"
)
as
%[<-%
Excl_included
%
leibniz_equiv
_
]%
auth_valid
_discrete_2
.
as
%[<-%
Excl_included
%
leibniz_equiv
_
]%
auth_
both_
valid
.
Qed
.
Qed
.
(** The view of the authority can be updated together with the local view. *)
(** The view of the authority can be updated together with the local view. *)
...
@@ -223,7 +223,8 @@ Proof.
...
@@ -223,7 +223,8 @@ Proof.
our camera named [γ], containing the empty list. This step (and the next)
our camera named [γ], containing the empty list. This step (and the next)
requires the fancy update modality that was introduced earlier. *)
requires the fancy update modality that was introduced earlier. *)
iMod
(
own_alloc
(
●
(
Some
(
Excl
[]))
⋅
◯
(
Some
(
Excl
[]))))
iMod
(
own_alloc
(
●
(
Some
(
Excl
[]))
⋅
◯
(
Some
(
Excl
[]))))
as
(
γ
)
"[Hγ● Hγ◯]"
;
(* Validity is trivial. *)
first
done
.
as
(
γ
)
"[Hγ● Hγ◯]"
;
(* Validity is trivial. *)
first
by
apply
auth_both_valid
.
(* We can then allocate the invariant (with mask [N]). Note that we can use
(* We can then allocate the invariant (with mask [N]). Note that we can use
[eauto 10 with iFrame] to prove [▷ stack_inv ℓ γ]. *)
[eauto 10 with iFrame] to prove [▷ stack_inv ℓ γ]. *)
iMod
(
inv_alloc
N
_
(
stack_inv
ℓ
γ
)
with
"[Hl Hγ●]"
)
iMod
(
inv_alloc
N
_
(
stack_inv
ℓ
γ
)
with
"[Hl Hγ●]"
)
...
...
theories/logrel/F_mu_ref/rules_binary.v
View file @
43d7f211
From
iris
.
program_logic
Require
Import
lifting
.
From
iris
.
program_logic
Require
Import
lifting
.
From
iris
.
algebra
Require
Import
auth
frac
agree
gmap
list
.
From
iris
.
algebra
Require
Import
excl
auth
frac
agree
gmap
list
.
From
iris_examples
.
logrel
.
F_mu_ref
Require
Export
rules
.
From
iris_examples
.
logrel
.
F_mu_ref
Require
Export
rules
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
Import
uPred
.
Import
uPred
.
...
@@ -65,7 +65,7 @@ Section cfg.
...
@@ -65,7 +65,7 @@ Section cfg.
iInv
specN
as
">Hspec"
"Hclose"
.
iInv
specN
as
">Hspec"
"Hclose"
.
iDestruct
"Hspec"
as
(
e''
σ
)
"[Hown %]"
.
iDestruct
"Hspec"
as
(
e''
σ
)
"[Hown %]"
.
iDestruct
(@
own_valid_2
with
"Hown Hj"
)
iDestruct
(@
own_valid_2
with
"Hown Hj"
)
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
Hvalid
]%
auth_valid
_discrete_2
;
subst
.
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
Hvalid
]%
auth_
both_
valid
;
subst
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
(
fill
K
e'
))).
}
(
exclusive_local_update
_
(
Excl
(
fill
K
e'
))).
}
...
@@ -93,7 +93,7 @@ Section cfg.
...
@@ -93,7 +93,7 @@ Section cfg.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
destruct
(
exist_fresh
(
dom
(
gset
positive
)
σ
))
as
[
l
Hl
%
not_elem_of_dom
].
destruct
(
exist_fresh
(
dom
(
gset
positive
)
σ
))
as
[
l
Hl
%
not_elem_of_dom
].
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_valid
_discrete_2
.
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_
both_
valid
.
subst
.
subst
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
...
@@ -117,10 +117,10 @@ Section cfg.
...
@@ -117,10 +117,10 @@ Section cfg.
rewrite
/
spec_ctx
/
tpool_mapsto
/
heapS_mapsto
.
rewrite
/
spec_ctx
/
tpool_mapsto
/
heapS_mapsto
.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_valid
_discrete_2
.
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_
both_
valid
.
subst
.
subst
.
iDestruct
(
own_valid_2
with
"Hown Hl"
)
iDestruct
(
own_valid_2
with
"Hown Hl"
)
as
%[[
_
?%
gen_heap_singleton_included
]%
prod_included
_
]%
auth_valid
_discrete_2
.
as
%[[
_
?%
gen_heap_singleton_included
]%
prod_included
_
]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
(
fill
K
(
of_val
v
)))).
}
(
exclusive_local_update
_
(
Excl
(
fill
K
(
of_val
v
)))).
}
...
@@ -139,10 +139,10 @@ Section cfg.
...
@@ -139,10 +139,10 @@ Section cfg.
rewrite
/
spec_ctx
/
tpool_mapsto
/
heapS_mapsto
.
rewrite
/
spec_ctx
/
tpool_mapsto
/
heapS_mapsto
.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
iInv
specN
as
">Hinv'"
"Hclose"
.
iDestruct
"Hinv'"
as
(
e2
σ
)
"[Hown %]"
.
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
iDestruct
(
own_valid_2
_
with
"Hown Hj"
)
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_valid
_discrete_2
.
as
%[[?%
Excl_included
%
leibniz_equiv
_
]%
prod_included
?]%
auth_
both_
valid
.
subst
.
subst
.
iDestruct
(
own_valid_2
_
with
"Hown Hl"
)
iDestruct
(
own_valid_2
_
with
"Hown Hl"
)
as
%[[
_
Hl
%
gen_heap_singleton_included
]%
prod_included
_
]%
auth_valid
_discrete_2
.
as
%[[
_
Hl
%
gen_heap_singleton_included
]%
prod_included
_
]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
{
by
eapply
auth_update
,
prod_local_update_1
,
option_local_update
,
(
exclusive_local_update
_
(
Excl
(
fill
K
Unit
))).
}
(
exclusive_local_update
_
(
Excl
(
fill
K
Unit
))).
}
...
...
theories/logrel/F_mu_ref/soundness.v
View file @
43d7f211
...
@@ -17,7 +17,7 @@ Proof.
...
@@ -17,7 +17,7 @@ Proof.
eapply
(
wp_adequacy
Σ
_
)
;
eauto
.
eapply
(
wp_adequacy
Σ
_
)
;
eauto
.
iIntros
(
Hinv
?).
iIntros
(
Hinv
?).
iMod
(
own_alloc
(
●
to_gen_heap
σ
))
as
(
γ
)
"Hh"
.
iMod
(
own_alloc
(
●
to_gen_heap
σ
))
as
(
γ
)
"Hh"
.
{
apply
(
auth_auth_valid
_
(
to_gen_heap_valid
_
_
σ
))
.
}
{
by
apply
auth_auth_valid
,
to_gen_heap_valid
.
}
iModIntro
.
iExists
(
λ
σ
_
,
own
γ
(
●
to_gen_heap
σ
))
;
iFrame
.
iModIntro
.
iExists
(
λ
σ
_
,
own
γ
(
●
to_gen_heap
σ
))
;
iFrame
.
set
(
Heap
Σ
:
=
(
HeapG
Σ
Hinv
(
GenHeapG
_
_
Σ
_
_
_
γ
))).
set
(
Heap
Σ
:
=
(
HeapG
Σ
Hinv
(
GenHeapG
_
_
Σ
_
_
_
γ
))).
iApply
(
wp_wand
with
"[]"
).
iApply
(
wp_wand
with
"[]"
).
...
...
theories/logrel/F_mu_ref/soundness_binary.v
View file @
43d7f211
From
iris_examples
.
logrel
.
F_mu_ref
Require
Export
context_refinement
.
From
iris_examples
.
logrel
.
F_mu_ref
Require
Export
context_refinement
.
From
iris
.
algebra
Require
Import
auth
frac
agree
.
From
iris
.
algebra
Require
Import
excl
auth
frac
agree
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
program_logic
Require
Import
adequacy
.
From
iris
.
program_logic
Require
Import
adequacy
.
From
iris_examples
.
logrel
.
F_mu_ref
Require
Import
soundness
.
From
iris_examples
.
logrel
.
F_mu_ref
Require
Import
soundness
.
...
@@ -16,10 +16,10 @@ Proof.
...
@@ -16,10 +16,10 @@ Proof.
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
(
own_alloc
(
●
to_gen_heap
∅
))
as
(
γ
)
"Hh"
.
{
apply
(
auth_auth_valid
_
(
to_gen_heap_valid
_
_
∅
))
.
}
{
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_valid
_discrete_2
.
split
=>//.
}
{
apply
auth_
both_
valid
.
split
=>//.
}
set
(
Hcfg
:
=
CFGSG
_
_
γ
c
).
set
(
Hcfg
:
=
CFGSG
_
_
γ
c
).
iMod
(
inv_alloc
specN
_
(
spec_ctx
([
e'
],
∅
))
with
"[Hcfg1]"
)
as
"#Hcfg"
.
iMod
(
inv_alloc
specN
_
(
spec_ctx
([
e'
],
∅
))
with
"[Hcfg1]"
)
as
"#Hcfg"
.
{
iNext
.
iExists
e'
,
∅
.
iSplit
;
eauto
.
{
iNext
.
iExists
e'
,
∅
.
iSplit
;
eauto
.
...
@@ -38,7 +38,7 @@ Proof.
...
@@ -38,7 +38,7 @@ Proof.
iDestruct
"Hinv"
as
(
e''
σ
)
"[Hown %]"
.
iDestruct
"Hinv"
as
(
e''
σ
)
"[Hown %]"
.
rewrite
/
tpool_mapsto
/=.
rewrite
/
tpool_mapsto
/=.
iDestruct
(
own_valid_2
with
"Hown Hj"
)
as
%
Hvalid
.
iDestruct
(
own_valid_2
with
"Hown Hj"
)
as
%
Hvalid
.
move
:
Hvalid
=>
/
auth_valid
_discrete_2
move
:
Hvalid
=>
/
auth_
both_
valid
[/
prod_included
[
Hv2
_
]
_
].
apply
Excl_included
,
leibniz_equiv
in
Hv2
.
subst
.
[/
prod_included
[
Hv2
_
]
_
].
apply
Excl_included
,
leibniz_equiv
in
Hv2
.
subst
.
iMod
(
"Hclose"
with
"[-]"
)
as
"_"
.
iMod
(
"Hclose"
with
"[-]"
)
as
"_"
.
+
iExists
(#
v2
),
σ
.
auto
.
+
iExists
(#
v2
),
σ
.
auto
.
...
...
theories/logrel/F_mu_ref_conc/examples/stack/refinement.v
View file @
43d7f211
...
@@ -47,7 +47,7 @@ Section Stack_refinement.
...
@@ -47,7 +47,7 @@ Section Stack_refinement.
simpl
.
iApply
wp_pure_step_later
;
trivial
.
iNext
.
simpl
.
simpl
.
iApply
wp_pure_step_later
;
trivial
.
iNext
.
simpl
.
iAsimpl
.
iAsimpl
.
(* establishing the invariant *)
(* establishing the invariant *)
iMod
(
own_alloc
(
●
(
∅
:
stackUR
)))
as
(
γ
)
"Hemp"
;
first
done
.
iMod
(
own_alloc
(
●
(
∅
:
stackUR
)))
as
(
γ
)
"Hemp"
;
first
by
apply
auth_auth_valid
.
set
(
istkG
:
=
StackG
_
_
γ
).
set
(
istkG
:
=
StackG
_
_
γ
).
change
γ
with
(@
stack_name
_
istkG
).
change
γ
with
(@
stack_name
_
istkG
).
change
H1
with
(@
stack_inG
_
istkG
).
change
H1
with
(@
stack_inG
_
istkG
).
...
...
theories/logrel/F_mu_ref_conc/examples/stack/stack_rules.v
View file @
43d7f211
...
@@ -25,7 +25,7 @@ Section Rules.
...
@@ -25,7 +25,7 @@ Section Rules.
Lemma
stack_mapstos_agree
l
v
w
:
l
↦ˢᵗᵏ
v
∗
l
↦ˢᵗᵏ
w
⊢
⌜
v
=
w
⌝
.
Lemma
stack_mapstos_agree
l
v
w
:
l
↦ˢᵗᵏ
v
∗
l
↦ˢᵗᵏ
w
⊢
⌜
v
=
w
⌝
.
Proof
.
Proof
.
rewrite
-
own_op
-
auth_frag_op
op_singleton
own_valid
.
rewrite
-
own_op
-
auth_frag_op
op_singleton
own_valid
.
by
iIntros
(->%
auth_
own
_valid
%
singleton_valid
%
agree_op_invL'
).
by
iIntros
(->%
auth_
frag
_valid
%
singleton_valid
%
agree_op_invL'
).
Qed
.
Qed
.
Program
Definition
StackLink_pre
(
Q
:
D
)
:
D
-
n
>
D
:
=
λ
ne
P
v
,
Program
Definition
StackLink_pre
(
Q
:
D
)
:
D
-
n
>
D
:
=
λ
ne
P
v
,
...
@@ -94,7 +94,7 @@ Section Rules.
...
@@ -94,7 +94,7 @@ Section Rules.
Proof
.
Proof
.
iIntros
"[Howns Hls] Hl"
.
iIntros
"[Howns Hls] Hl"
.
iDestruct
(
own_valid_2
with
"Howns Hl"
)
iDestruct
(
own_valid_2
with
"Howns Hl"
)
as
%[[
az
[
Haz
Hq
]]%
singleton_included
_
]%
auth_valid
_discrete_2
.
as
%[[
az
[
Haz
Hq
]]%
singleton_included
_
]%
auth_
both_
valid
.
rewrite
lookup_fmap
in
Haz
.
rewrite
lookup_fmap
in
Haz
.
assert
(
∃
z
,
h
!!
l
=
Some
z
)
as
Hz
.
assert
(
∃
z
,
h
!!
l
=
Some
z
)
as
Hz
.
{
revert
Haz
;
case
:
(
h
!!
l
)
=>
[
z
|]
Hz
;
first
(
by
eauto
)
;
inversion
Hz
.
}
{
revert
Haz
;
case
:
(
h
!!
l
)
=>
[
z
|]
Hz
;
first
(
by
eauto
)
;
inversion
Hz
.
}
...
...
theories/logrel/F_mu_ref_conc/rules_binary.v
View file @
43d7f211
From
iris
.
program_logic
Require
Export
language
ectx_language
ectxi_language
.
From
iris
.
program_logic
Require
Export
language
ectx_language
ectxi_language
.
From
iris
.
program_logic
Require
Import
lifting
.
From
iris
.
program_logic
Require
Import
lifting
.
From
iris
.
algebra
Require
Import
auth
frac
agree
gmap
list
.
From
iris
.
algebra
Require
Import
excl
auth
frac
agree
gmap
list
.
From
iris_examples
.
logrel
.
F_mu_ref_conc
Require
Export
rules
.
From
iris_examples
.
logrel
.
F_mu_ref_conc
Require
Export
rules
.
From
iris
.
proofmode
Require
Import
tactics
.
From
iris
.
proofmode
Require
Import
tactics
.
Import
uPred
.
Import
uPred
.
...
@@ -174,7 +174,7 @@ Section cfg.
...
@@ -174,7 +174,7 @@ Section cfg.
iInv
specN
as
(
tp
σ
)
">[Hown Hrtc]"
"Hclose"
.
iInv
specN
as
(
tp
σ
)
">[Hown Hrtc]"
"Hclose"
.
iDestruct
"Hrtc"
as
%
Hrtc
.
iDestruct
"Hrtc"
as
%
Hrtc
.
iDestruct
(
own_valid_2
with
"Hown Hj"
)
iDestruct
(
own_valid_2
with
"Hown Hj"
)
as
%[[
Htpj
%
tpool_singleton_included'
_
]%
prod_included
?]%
auth_valid
_discrete_2
.
as
%[[
Htpj
%
tpool_singleton_included'
_
]%
prod_included
?]%
auth_
both_
valid
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
iMod
(
own_update_2
with
"Hown Hj"
)
as
"[Hown Hj]"
.
{
by
eapply
auth_update
,
prod_local_update_1
,
{
by
eapply
auth_update
,
prod_local_update_1
,
singleton_local_update
,
(
exclusive_local_update
_
(
Excl
(
fill
K
e'
))).
}
singleton_local_update
,
(
exclusive_local_update
_
(
Excl
(
fill
K
e'
))).
}
...
@@ -221,7 +221,7 @@ Section cfg.
...
@@ -221,7 +221,7 @@ Section cfg.