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
0e60fa20
Commit
0e60fa20
authored
4 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
more comments explaining the weakened typing rule
parent
97946ce6
No related branches found
No related tags found
1 merge request
!19
add GhostCell proof
Pipeline
#43283
passed
4 years ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/typing/examples/nonlexical.v
+3
-1
3 additions, 1 deletion
theories/typing/examples/nonlexical.v
theories/typing/programs.v
+15
-2
15 additions, 2 deletions
theories/typing/programs.v
with
18 additions
and
3 deletions
theories/typing/examples/nonlexical.v
+
3
−
1
View file @
0e60fa20
...
...
@@ -116,7 +116,9 @@ Section non_lexical.
iIntros
(
unwrap'
)
.
simpl_subst
.
iApply
(
type_letcall
());
[
solve_typing
..|]
.
iIntros
(
r
)
.
simpl_subst
.
iApply
type_jump
;
solve_typing
.
-
iApply
(
type_equivalize_lft
_
_
_
_
[_;
_;
_;
_;
_;
_;
_;
_])
.
-
(* Use lifetime equalization to replace one lifetime by another:
[&uniq{κ} V] becomes [&uniq{m} V] in the type of [o +ₗ #1]. *)
iApply
(
type_equivalize_lft
_
_
_
_
[_;
_;
_;
_;
_;
_;
_;
_])
.
{
iIntros
(
tid
)
"#LFT #Hκ1 #Hκ2 ($ & Href & $ & $ & $ & $ & $ & $ & _)"
.
rewrite
-
tctx_interp_singleton
.
iApply
(
type_incl_tctx_incl
with
"[] Href"
)
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/programs.v
+
15
−
2
View file @
0e60fa20
...
...
@@ -119,8 +119,21 @@ Section typing_rules.
typed_body
E
L
C
T
e
-∗
typed_body
E
L
C
T
e
.
Proof
.
done
.
Qed
.
(** This version is *weaker* than what was in the original paper;
it had to be adjusted for GhostCell. *)
(** This lemma can replace [κ1] by [κ2] and vice versa in positions that
respect "semantic lifetime equivalence"; in particular, lifetimes of
references can be adjusted this way. However, it cannot replace lifetimes in
other type constructors, as those might only respect *syntactic* lifetime
equivalence. This lemma is *weaker* than what was in the original paper where
lifetimes could be replaced everywhere; it had to be adjusted for GhostCell.
See [typing.lib.diverging_static] for an example of how
[type_equivalize_lft_static] without this restriction ciuld be used to subvert
branding.
This is technically not a proper typing rule since the type system has no way
to express "subtyping wrt semantic lifetime inclusion". However, there is no
fundamental reason that we could not also reflect all these semantic facts on
the syntactic side, it would just be very clunky (and note that in Coq we do
not reflect this syntactic side anway). *)
Lemma
type_equivalize_lft
E
L
C
T1
T2
κ1
κ2
e
:
(
∀
tid
,
lft_ctx
-∗
κ1
⊑
κ2
-∗
κ2
⊑
κ1
-∗
tctx_interp
tid
T1
-∗
tctx_interp
tid
T2
)
→
(
⊢
typed_body
E
L
C
T2
e
)
→
...
...
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