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
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Service Desk
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
Iris
lambda-rust
Commits
72a1c9c3
Commit
72a1c9c3
authored
7 months ago
by
Ralf Jung
Browse files
Options
Downloads
Plain Diff
Merge branch 'ci/lennard/refinedrust' into 'master'
Add lemmas used by RefinedRust See merge request
!38
parents
bd958899
dc435d80
No related branches found
No related tags found
1 merge request
!38
Add lemmas used by RefinedRust
Pipeline
#106810
failed
7 months ago
Stage: build
Changes
3
Pipelines
12
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
lifetime/lifetime_sig.v
+8
-0
8 additions, 0 deletions
lifetime/lifetime_sig.v
lifetime/model/creation.v
+13
-0
13 additions, 0 deletions
lifetime/model/creation.v
lifetime/model/primitive.v
+11
-0
11 additions, 0 deletions
lifetime/model/primitive.v
with
32 additions
and
0 deletions
lifetime/lifetime_sig.v
+
8
−
0
View file @
72a1c9c3
...
@@ -107,6 +107,7 @@ Module Type lifetime_sig.
...
@@ -107,6 +107,7 @@ Module Type lifetime_sig.
Parameter
lft_dead_or
:
∀
κ1
κ2
,
[
†
κ1
]
∨
[
†
κ2
]
⊣⊢
[
†
κ1
⊓
κ2
]
.
Parameter
lft_dead_or
:
∀
κ1
κ2
,
[
†
κ1
]
∨
[
†
κ2
]
⊣⊢
[
†
κ1
⊓
κ2
]
.
Parameter
lft_tok_dead
:
∀
q
κ
,
q
.[
κ
]
-∗
[
†
κ
]
-∗
False
.
Parameter
lft_tok_dead
:
∀
q
κ
,
q
.[
κ
]
-∗
[
†
κ
]
-∗
False
.
Parameter
lft_tok_static
:
∀
q
,
⊢
q
.[
static
]
.
Parameter
lft_tok_static
:
∀
q
,
⊢
q
.[
static
]
.
Parameter
lft_tok_valid
:
∀
q
κ
,
q
.[
κ
]
-∗
⌜
(
q
≤
1
)
%
Qp
⌝
∨
⌜
κ
=
static
⌝.
Parameter
lft_dead_static
:
[
†
static
]
-∗
False
.
Parameter
lft_dead_static
:
[
†
static
]
-∗
False
.
Parameter
lft_intersect_static_cancel_l
:
∀
κ
κ'
,
κ
⊓
κ'
=
static
→
κ
=
static
.
Parameter
lft_intersect_static_cancel_l
:
∀
κ
κ'
,
κ
⊓
κ'
=
static
→
κ
=
static
.
...
@@ -117,6 +118,13 @@ Module Type lifetime_sig.
...
@@ -117,6 +118,13 @@ Module Type lifetime_sig.
lft_ctx
=
{
E
}
=∗
lft_ctx
=
{
E
}
=∗
∃
p
:
positive
,
let
κ
:=
positive_to_lft
p
in
⌜
P
p
⌝
∗
∃
p
:
positive
,
let
κ
:=
positive_to_lft
p
in
⌜
P
p
⌝
∗
(
1
).[
κ
]
∗
□
((
1
).[
κ
]
=
{
↑
lftN
∪
userE
}[
userE
]
▷=∗
[
†
κ
])
.
(
1
).[
κ
]
∗
□
((
1
).[
κ
]
=
{
↑
lftN
∪
userE
}[
userE
]
▷=∗
[
†
κ
])
.
(** Given two lifetimes [κ] and [κ'], find a lower bound on atomic lifetimes [m]
such that [m ⊓ κ'] is syntactically different from [κ].
This is useful in conjunction with [lft_create_strong] to generate
fresh lifetimes when using lifetimes as keys to index into a map. *)
Parameter
lft_fresh
:
∀
κ
κ'
,
∃
i
:
positive
,
∀
m
:
positive
,
(
i
<
m
)
%
positive
→
(
positive_to_lft
m
)
⊓
κ'
≠
κ
.
Parameter
bor_create
:
∀
E
κ
P
,
Parameter
bor_create
:
∀
E
κ
P
,
↑
lftN
⊆
E
→
lft_ctx
-∗
▷
P
=
{
E
}
=∗
&
{
κ
}
P
∗
([
†
κ
]
=
{
E
}
=∗
▷
P
)
.
↑
lftN
⊆
E
→
lft_ctx
-∗
▷
P
=
{
E
}
=∗
&
{
κ
}
P
∗
([
†
κ
]
=
{
E
}
=∗
▷
P
)
.
Parameter
bor_fake
:
∀
E
κ
P
,
Parameter
bor_fake
:
∀
E
κ
P
,
...
...
This diff is collapsed.
Click to expand it.
lifetime/model/creation.v
+
13
−
0
View file @
72a1c9c3
...
@@ -184,4 +184,17 @@ Proof.
...
@@ -184,4 +184,17 @@ Proof.
eapply
HK''
,
Hκ
.
rewrite
elem_of_union
.
auto
.
eapply
HK''
,
Hκ
.
rewrite
elem_of_union
.
auto
.
+
iRight
.
iFrame
.
iPureIntro
.
by
apply
lft_dead_in_insert_false
.
+
iRight
.
iFrame
.
iPureIntro
.
by
apply
lft_dead_in_insert_false
.
Qed
.
Qed
.
Lemma
lft_fresh
κ
κ'
:
∃
i
:
positive
,
∀
m
:
positive
,
(
i
<
m
)
%
positive
→
(
positive_to_lft
m
)
⊓
κ'
≠
κ
.
Proof
.
unfold
meet
,
lft_intersect
.
destruct
(
minimal_exists
(
flip
Pos
.
le
)
(
dom
κ
))
as
(
i
&
Ha
)
.
exists
(
i
+
1
)
%
positive
.
intros
k
Hik
Heq
.
subst
κ
.
ospecialize
(
Ha
k
_
_);
simpl
in
*
;
[
|
lia
..]
.
apply
gmultiset_elem_of_dom
.
apply
gmultiset_elem_of_disj_union
.
left
.
by
apply
gmultiset_elem_of_singleton
.
Qed
.
End
creation
.
End
creation
.
This diff is collapsed.
Click to expand it.
lifetime/model/primitive.v
+
11
−
0
View file @
72a1c9c3
...
@@ -313,6 +313,17 @@ Proof.
...
@@ -313,6 +313,17 @@ Proof.
naive_solver
.
naive_solver
.
Qed
.
Qed
.
Lemma
lft_tok_valid
q
κ
:
q
.[
κ
]
-∗
⌜
(
q
≤
1
)
%
Qp
⌝
∨
⌜
κ
=
static
⌝.
Proof
.
rewrite
/
lft_tok
.
destruct
(
decide
(
κ
=
static
))
as
[
->
|
Hneq
];
first
by
eauto
.
edestruct
(
gmultiset_choose
_
Hneq
)
as
(
Λ
&
Hel
)
.
iIntros
"Hm"
.
iPoseProof
(
big_sepMS_elem_of
with
"Hm"
)
as
"Hm"
;
first
done
.
iPoseProof
(
own_valid
with
"Hm"
)
as
"%Hv"
.
iLeft
.
iPureIntro
.
rewrite
auth_frag_valid
in
Hv
.
apply
singleton_valid
in
Hv
.
done
.
Qed
.
(* Fractional and AsFractional instances *)
(* Fractional and AsFractional instances *)
Global
Instance
lft_tok_fractional
κ
:
Fractional
(
λ
q
,
q
.[
κ
])
%
I
.
Global
Instance
lft_tok_fractional
κ
:
Fractional
(
λ
q
,
q
.[
κ
])
%
I
.
Proof
.
Proof
.
...
...
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