Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Simon Spies
lambda-rust
Commits
25f2d41c
Commit
25f2d41c
authored
8 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
show that the lifetime logic can be initialized
parent
8d46a3e9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/lifetime/lifetime_sig.v
+18
-8
18 additions, 8 deletions
theories/lifetime/lifetime_sig.v
theories/lifetime/model/primitive.v
+13
-0
13 additions, 0 deletions
theories/lifetime/model/primitive.v
with
31 additions
and
8 deletions
theories/lifetime/lifetime_sig.v
+
18
−
8
View file @
25f2d41c
...
...
@@ -47,6 +47,17 @@ Class lftG Σ := LftG {
lft_inh_inG
:>
inG
Σ
(
authR
inhUR
);
}
.
Class
lftPreG
Σ
:=
LftPreG
{
lft_preG_box
:>
boxG
Σ
;
alft_preG_inG
:>
inG
Σ
(
authR
alftUR
);
ilft_preG_inG
:>
inG
Σ
(
authR
ilftUR
);
lft_preG_bor_inG
:>
inG
Σ
(
authR
borUR
);
lft_preG_cnt_inG
:>
inG
Σ
(
authR
natUR
);
lft_preG_inh_inG
:>
inG
Σ
(
authR
inhUR
);
}
.
(* TODO: Write a Σ for lftPreG *)
Module
Type
lifetime_sig
.
(** Definitions *)
Parameter
lft_ctx
:
∀
`{
invG
,
lftG
Σ
},
iProp
Σ
.
...
...
@@ -130,21 +141,17 @@ Module Type lifetime_sig.
Parameter
bor_unnest
:
∀
E
κ
κ'
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ'
}
&
{
κ
}
P
=
{
E
,
E
∖↑
lftN
}
▷=∗
&
{
κ
∪
κ'
}
P
.
Parameter
idx_bor_acc
:
∀
E
q
κ
i
P
,
↑
lftN
⊆
E
→
Parameter
idx_bor_acc
:
∀
E
q
κ
i
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ
,
i
}
P
-∗
idx_bor_own
1
i
-∗
q
.[
κ
]
=
{
E
}
=∗
▷
P
∗
(
▷
P
=
{
E
}
=∗
idx_bor_own
1
i
∗
q
.[
κ
])
.
Parameter
idx_bor_atomic_acc
:
∀
E
q
κ
i
P
,
↑
lftN
⊆
E
→
Parameter
idx_bor_atomic_acc
:
∀
E
q
κ
i
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ
,
i
}
P
-∗
idx_bor_own
q
i
=
{
E
,
E
∖↑
lftN
}
=∗
(
▷
P
∗
(
▷
P
=
{
E
∖↑
lftN
,
E
}
=∗
idx_bor_own
q
i
))
∨
([
†
κ
]
∗
|
=
{
E
∖↑
lftN
,
E
}=>
idx_bor_own
q
i
)
.
Parameter
bor_acc_strong
:
∀
E
q
κ
P
,
↑
lftN
⊆
E
→
Parameter
bor_acc_strong
:
∀
E
q
κ
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ
}
P
-∗
q
.[
κ
]
=
{
E
}
=∗
∃
κ'
,
κ
⊑
κ'
∗
▷
P
∗
∀
Q
,
▷
Q
-∗
▷
(
▷
Q
-∗
[
†
κ'
]
=
{
⊤∖↑
lftN
}
=∗
▷
P
)
=
{
E
}
=∗
&
{
κ'
}
Q
∗
q
.[
κ
]
.
Parameter
bor_acc_atomic_strong
:
∀
E
κ
P
,
↑
lftN
⊆
E
→
Parameter
bor_acc_atomic_strong
:
∀
E
κ
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
&
{
κ
}
P
=
{
E
,
E
∖↑
lftN
}
=∗
(
∃
κ'
,
κ
⊑
κ'
∗
▷
P
∗
∀
Q
,
▷
Q
-∗
▷
(
▷
Q
-∗
[
†
κ'
]
=
{
⊤∖↑
lftN
}
=∗
▷
P
)
=
{
E
∖↑
lftN
,
E
}
=∗
&
{
κ'
}
Q
)
∨
...
...
@@ -177,4 +184,7 @@ Module Type lifetime_sig.
(
▷
P
∗
(
▷
P
=
{
E
∖↑
lftN
,
E
}
=∗
&
{
κ
}
P
))
∨
([
†
κ
]
∗
|
=
{
E
∖↑
lftN
,
E
}=>
True
)
.
End
properties
.
Parameter
lft_init
:
∀
`{
invG
Σ
,
!
lftPreG
Σ
}
E
,
↑
lftN
⊆
E
→
True
=
{
E
}
=∗
∃
_
:
lftG
Σ
,
lft_ctx
.
End
lifetime_sig
.
This diff is collapsed.
Click to expand it.
theories/lifetime/model/primitive.v
+
13
−
0
View file @
25f2d41c
...
...
@@ -18,6 +18,19 @@ Proof.
by
move
=>
/
Some_pair_included
[_]
/
Some_included_total
/
to_agree_included
=>
->
.
Qed
.
Lemma
lft_init
`{
!
lftPreG
Σ
}
E
:
↑
lftN
⊆
E
→
(|
=
{
E
}=>
∃
_
:
lftG
Σ
,
lft_ctx
)
%
I
.
Proof
.
iIntros
(?)
.
rewrite
/
lft_ctx
.
iMod
(
own_alloc
(
●
∅
:
authR
alftUR
))
as
(
γa
)
"Ha"
;
first
done
.
iMod
(
own_alloc
(
●
∅
:
authR
ilftUR
))
as
(
γi
)
"Hi"
;
first
done
.
set
(
HlftG
:=
LftG
_
_
_
γa
_
γi
_
_
_)
.
iExists
HlftG
.
iMod
(
inv_alloc
_
_
lfts_inv
with
"[Ha Hi]"
)
as
"$"
;
last
done
.
iModIntro
.
rewrite
/
lfts_inv
/
own_alft_auth
/
own_ilft_auth
.
iExists
∅
,
∅.
rewrite
/
to_alftUR
/
to_ilftUR
!
fmap_empty
.
iFrame
.
rewrite
dom_empty_L
big_sepS_empty
.
done
.
Qed
.
(** Ownership *)
Lemma
own_ilft_auth_agree
(
I
:
gmap
lft
lft_names
)
κ
γs
:
own_ilft_auth
I
-∗
...
...
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