Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Abhishek Anand
Iris
Commits
42da9a0b
Commit
42da9a0b
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
rename AccElim -> ElimAcc
parent
dc47e022
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/program_logic/weakestpre.v
+6
-6
6 additions, 6 deletions
theories/program_logic/weakestpre.v
theories/proofmode/class_instances_sbi.v
+8
-8
8 additions, 8 deletions
theories/proofmode/class_instances_sbi.v
theories/proofmode/classes.v
+7
-7
7 additions, 7 deletions
theories/proofmode/classes.v
with
21 additions
and
21 deletions
theories/program_logic/weakestpre.v
+
6
−
6
View file @
42da9a0b
...
...
@@ -405,22 +405,22 @@ Section proofmode_classes.
AddModal
(|
=
{
E
}=>
P
)
P
(
WP
e
@
s
;
E
{{
Φ
}})
.
Proof
.
by
rewrite
/
AddModal
fupd_frame_r
wand_elim_r
fupd_wp
.
Qed
.
Global
Instance
acc_
elim_wp
{
X
}
E1
E2
α
β
γ
e
s
Φ
:
Global
Instance
elim
_acc
_wp
{
X
}
E1
E2
α
β
γ
e
s
Φ
:
Atomic
(
stuckness_to_atomicity
s
)
e
→
Acc
Elim
(
X
:=
X
)
E1
E2
α
β
γ
(
WP
e
@
s
;
E1
{{
Φ
}})
Elim
Acc
(
X
:=
X
)
E1
E2
α
β
γ
(
WP
e
@
s
;
E1
{{
Φ
}})
(
λ
x
,
WP
e
@
s
;
E2
{{
v
,
|
=
{
E2
}=>
β
x
∗
coq_tactics
.
maybe_wand
(
γ
x
)
(
Φ
v
)
}})
%
I
.
Proof
.
intros
?
.
rewrite
/
Acc
Elim
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
intros
?
.
rewrite
/
Elim
Acc
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
iIntros
"Hinner >Hacc"
.
iDestruct
"Hacc"
as
(
x
)
"[Hα Hclose]"
.
iApply
(
wp_wand
with
"[Hinner Hα]"
);
first
by
iApply
"Hinner"
.
iIntros
(
v
)
">[Hβ HΦ]"
.
iApply
"HΦ"
.
by
iApply
"Hclose"
.
Qed
.
Global
Instance
acc_
elim_wp_nonatomic
{
X
}
E
α
β
γ
e
s
Φ
:
Acc
Elim
(
X
:=
X
)
E
E
α
β
γ
(
WP
e
@
s
;
E
{{
Φ
}})
Global
Instance
elim
_acc
_wp_nonatomic
{
X
}
E
α
β
γ
e
s
Φ
:
Elim
Acc
(
X
:=
X
)
E
E
α
β
γ
(
WP
e
@
s
;
E
{{
Φ
}})
(
λ
x
,
WP
e
@
s
;
E
{{
v
,
|
=
{
E
}=>
β
x
∗
coq_tactics
.
maybe_wand
(
γ
x
)
(
Φ
v
)
}})
%
I
.
Proof
.
rewrite
/
Acc
Elim
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
rewrite
/
Elim
Acc
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
iIntros
"Hinner >Hacc"
.
iDestruct
"Hacc"
as
(
x
)
"[Hα Hclose]"
.
iApply
wp_fupd
.
iApply
(
wp_wand
with
"[Hinner Hα]"
);
first
by
iApply
"Hinner"
.
...
...
This diff is collapsed.
Click to expand it.
theories/proofmode/class_instances_sbi.v
+
8
−
8
View file @
42da9a0b
...
...
@@ -551,14 +551,14 @@ Global Instance add_modal_embed_fupd_goal `{BiEmbedFUpd PROP PROP'}
AddModal
P
P'
(|
=
{
E1
,
E2
}=>
⎡
Q
⎤
)
%
I
→
AddModal
P
P'
⎡|=
{
E1
,
E2
}=>
Q
⎤.
Proof
.
by
rewrite
/
AddModal
!
embed_fupd
.
Qed
.
(*
Acc
Elim *)
Global
Instance
acc_
elim_vs
`{
BiFUpd
PROP
}
{
X
}
E1
E2
E
α
β
γ
Q
:
(* FIXME: Why %I?
Acc
Elim sets the right scopes! *)
Acc
Elim
(
X
:=
X
)
E1
E2
α
β
γ
(* Elim
Acc
*)
Global
Instance
elim
_acc
_vs
`{
BiFUpd
PROP
}
{
X
}
E1
E2
E
α
β
γ
Q
:
(* FIXME: Why %I? Elim
Acc
sets the right scopes! *)
Elim
Acc
(
X
:=
X
)
E1
E2
α
β
γ
(|
=
{
E1
,
E
}=>
Q
)
(
λ
x
,
|
=
{
E2
}=>
(
β
x
∗
(
coq_tactics
.
maybe_wand
(
γ
x
)
(|
=
{
E1
,
E
}=>
Q
))))
%
I
.
Proof
.
rewrite
/
Acc
Elim
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
rewrite
/
Elim
Acc
.
setoid_rewrite
coq_tactics
.
maybe_wand_sound
.
iIntros
"Hinner >Hacc"
.
iDestruct
"Hacc"
as
(
x
)
"[Hα Hclose]"
.
iMod
(
"Hinner"
with
"Hα"
)
as
"[Hβ Hfin]"
.
iMod
(
"Hclose"
with
"Hβ"
)
as
"Hγ"
.
by
iApply
"Hfin"
.
...
...
@@ -573,10 +573,10 @@ Global Instance elim_inv_acc_without_close `{BiFUpd PROP} {X : Type}
φ
Pinv
Pin
E1
E2
α
β
γ
Q
(
Q'
:
X
→
PROP
)
:
IntoAcc
(
X
:=
X
)
Pinv
φ
Pin
E1
E2
α
β
γ
→
Acc
Elim
(
X
:=
X
)
E1
E2
α
β
γ
Q
Q'
→
Elim
Acc
(
X
:=
X
)
E1
E2
α
β
γ
Q
Q'
→
ElimInv
φ
Pinv
Pin
α
None
Q
Q'
.
Proof
.
rewrite
/
Acc
Elim
/
IntoAcc
/
ElimInv
.
rewrite
/
Elim
Acc
/
IntoAcc
/
ElimInv
.
iIntros
(
Hacc
Helim
Hφ
)
"(Hinv & Hin & Hcont)"
.
iApply
(
Helim
with
"[Hcont]"
)
.
-
iIntros
(
x
)
"Hα"
.
iApply
"Hcont"
.
iSplitL
;
done
.
...
...
@@ -591,7 +591,7 @@ Global Instance elim_inv_acc_with_close `{BiFUpd PROP} {X : Type}
ElimInv
(
X
:=
X
)
φ
Pinv
Pin
α
(
Some
(
λ
x
,
β
x
=
{
E2
,
E1
}
=∗
default
emp
(
γ
x
)
id
))
%
I
Q
(
λ
_,
Q'
)
.
Proof
.
rewrite
/
Acc
Elim
/
IntoAcc
/
ElimInv
.
rewrite
/
Elim
Acc
/
IntoAcc
/
ElimInv
.
iIntros
(
Hacc
Helim
Hφ
)
"(Hinv & Hin & Hcont)"
.
iMod
(
Hacc
with
"Hinv Hin"
)
as
(
x
)
"[Hα Hclose]"
;
first
done
.
iApply
"Hcont"
.
simpl
.
iSplitL
"Hα"
;
done
.
...
...
This diff is collapsed.
Click to expand it.
theories/proofmode/classes.v
+
7
−
7
View file @
42da9a0b
...
...
@@ -516,7 +516,7 @@ Hint Mode IntoInv + ! - : typeclass_instances.
(** Accessors.
This definition only exists for the purpose of the proof mode; a truly
usable and general form would use telescopes and also allow binders for the
closing view shift. [γ] is an [option] to make it easy for
Acc
Elim
closing view shift. [γ] is an [option] to make it easy for Elim
Acc
instances to recognize the [emp] case and make it look nicer. *)
Definition
accessor
`{
BiFUpd
PROP
}
{
X
:
Type
}
(
E1
E2
:
coPset
)
(
α
β
:
X
→
PROP
)
(
γ
:
X
→
option
PROP
)
:
PROP
:=
...
...
@@ -529,12 +529,12 @@ Definition accessor `{BiFUpd PROP} {X : Type} (E1 E2 : coPset)
Elliminates an accessor [accessor E1 E2 α β γ] in goal [Q'], turning the goal
into [Q'] with a new assumption [α x]. *)
Class
Acc
Elim
`{
BiFUpd
PROP
}
{
X
:
Type
}
E1
E2
(
α
β
:
X
→
PROP
)
(
γ
:
X
→
option
PROP
)
Class
Elim
Acc
`{
BiFUpd
PROP
}
{
X
:
Type
}
E1
E2
(
α
β
:
X
→
PROP
)
(
γ
:
X
→
option
PROP
)
(
Q
:
PROP
)
(
Q'
:
X
→
PROP
)
:=
acc_
elim
:
((
∀
x
,
α
x
-∗
Q'
x
)
-∗
accessor
E1
E2
α
β
γ
-∗
Q
)
.
Arguments
Acc
Elim
{_}
{_}
{_}
_
_
_
%
I
_
%
I
_
%
I
_
%
I
:
simpl
never
.
Arguments
acc_
elim
{_}
{_}
{_}
_
_
_
%
I
_
%
I
_
%
I
_
%
I
{_}
.
Hint
Mode
Acc
Elim
+
+
!
-
-
!
!
!
!
-
:
typeclass_instances
.
elim
_acc
:
((
∀
x
,
α
x
-∗
Q'
x
)
-∗
accessor
E1
E2
α
β
γ
-∗
Q
)
.
Arguments
Elim
Acc
{_}
{_}
{_}
_
_
_
%
I
_
%
I
_
%
I
_
%
I
:
simpl
never
.
Arguments
elim
_acc
{_}
{_}
{_}
_
_
_
%
I
_
%
I
_
%
I
_
%
I
{_}
.
Hint
Mode
Elim
Acc
+
+
!
-
-
!
!
!
!
-
:
typeclass_instances
.
(* Turn [P] into an accessor.
Inputs:
...
...
@@ -566,7 +566,7 @@ Hint Mode IntoAcc + - ! - - - - - - - - : typeclass_instances.
- [Q'] is the transformed goal that must be proved after opening the invariant.
Most users will never want to instantiate this; there is a general instance
based on [
Acc
Elim] and [IntoAcc]. However, logics like Iris 2 that support
based on [Elim
Acc
] and [IntoAcc]. However, logics like Iris 2 that support
invariants but not mask-changing fancy updates can use this class directly to
still benefit from [iInv].
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment