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
Rice Wine
Iris
Commits
d2b00f17
Commit
d2b00f17
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
auth: strong allocation and some more proper lemmas
parent
e24c006e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
program_logic/auth.v
+18
-4
18 additions, 4 deletions
program_logic/auth.v
with
18 additions
and
4 deletions
program_logic/auth.v
+
18
−
4
View file @
d2b00f17
...
@@ -30,6 +30,12 @@ Section definitions.
...
@@ -30,6 +30,12 @@ Section definitions.
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
auth_own_timeless
a
:
TimelessP
(
auth_own
a
)
.
Global
Instance
auth_own_timeless
a
:
TimelessP
(
auth_own
a
)
.
Proof
.
apply
_
.
Qed
.
Proof
.
apply
_
.
Qed
.
Global
Instance
auth_inv_ne
n
:
Proper
(
pointwise_relation
A
(
dist
n
)
==>
dist
n
)
(
auth_inv
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
auth_ctx_ne
n
N
:
Proper
(
pointwise_relation
A
(
dist
n
)
==>
dist
n
)
(
auth_ctx
N
)
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
auth_ctx_persistent
N
φ
:
PersistentP
(
auth_ctx
N
φ
)
.
Global
Instance
auth_ctx_persistent
N
φ
:
PersistentP
(
auth_ctx
N
φ
)
.
Proof
.
apply
_
.
Qed
.
Proof
.
apply
_
.
Qed
.
End
definitions
.
End
definitions
.
...
@@ -53,16 +59,24 @@ Section auth.
...
@@ -53,16 +59,24 @@ Section auth.
Lemma
auth_own_valid
γ
a
:
auth_own
γ
a
⊢
✓
a
.
Lemma
auth_own_valid
γ
a
:
auth_own
γ
a
⊢
✓
a
.
Proof
.
by
rewrite
/
auth_own
own_valid
auth_validI
.
Qed
.
Proof
.
by
rewrite
/
auth_own
own_valid
auth_validI
.
Qed
.
Lemma
auth_alloc
N
E
a
:
Lemma
auth_alloc
_strong
N
E
a
(
G
:
gset
gname
)
:
✓
a
→
nclose
N
⊆
E
→
✓
a
→
nclose
N
⊆
E
→
▷
φ
a
=
{
E
}=>
∃
γ
,
auth_ctx
γ
N
φ
∧
auth_own
γ
a
.
▷
φ
a
=
{
E
}=>
∃
γ
,
■
(
γ
∉
G
)
∧
auth_ctx
γ
N
φ
∧
auth_own
γ
a
.
Proof
.
Proof
.
iIntros
{??}
"Hφ"
.
rewrite
/
auth_own
/
auth_ctx
.
iIntros
{??}
"Hφ"
.
rewrite
/
auth_own
/
auth_ctx
.
iPvs
(
own_alloc
(
Auth
(
Excl'
a
)
a
))
as
{
γ
}
"Hγ"
;
first
done
.
iPvs
(
own_alloc
_strong
(
Auth
(
Excl'
a
)
a
)
_
G
)
as
{
γ
}
"
[%
Hγ
]
"
;
first
done
.
iRevert
"Hγ"
;
rewrite
auth_both_op
;
iIntros
"[Hγ Hγ']"
.
iRevert
"Hγ"
;
rewrite
auth_both_op
;
iIntros
"[Hγ Hγ']"
.
iPvs
(
inv_alloc
N
_
(
auth_inv
γ
φ
)
with
"[-Hγ']"
);
first
done
.
iPvs
(
inv_alloc
N
_
(
auth_inv
γ
φ
)
with
"[-Hγ']"
);
first
done
.
{
iNext
.
iExists
a
.
by
iFrame
"Hφ"
.
}
{
iNext
.
iExists
a
.
by
iFrame
"Hφ"
.
}
iPvsIntro
;
iExists
γ
;
by
iFrame
"Hγ'"
.
iPvsIntro
;
iExists
γ
.
iSplit
;
first
by
iPureIntro
.
by
iFrame
"Hγ'"
.
Qed
.
Lemma
auth_alloc
N
E
a
:
✓
a
→
nclose
N
⊆
E
→
▷
φ
a
=
{
E
}=>
∃
γ
,
auth_ctx
γ
N
φ
∧
auth_own
γ
a
.
Proof
.
iIntros
{??}
"Hφ"
.
iPvs
(
auth_alloc_strong
N
E
a
∅
with
"Hφ"
)
as
{
γ
}
"[_ ?]"
;
[
done
..|]
.
by
iExists
γ
.
Qed
.
Qed
.
Lemma
auth_empty
γ
E
:
True
=
{
E
}=>
auth_own
γ
∅.
Lemma
auth_empty
γ
E
:
True
=
{
E
}=>
auth_own
γ
∅.
...
...
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