Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Actris
Commits
ee0d1bfc
Commit
ee0d1bfc
authored
May 06, 2020
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make exist contractive again, as that is more uniform.
parent
0ec00437
Pipeline
#27748
passed with stage
in 5 minutes and 46 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
13 deletions
+19
-13
theories/logrel/subtyping_rules.v
theories/logrel/subtyping_rules.v
+1
-1
theories/logrel/term_types.v
theories/logrel/term_types.v
+4
-1
theories/logrel/term_typing_rules.v
theories/logrel/term_typing_rules.v
+14
-11
No files found.
theories/logrel/subtyping_rules.v
View file @
ee0d1bfc
...
@@ -171,7 +171,7 @@ Section subtyping_rules.
...
@@ -171,7 +171,7 @@ Section subtyping_rules.
Qed
.
Qed
.
Lemma
lty_le_exist
C1
C2
:
Lemma
lty_le_exist
C1
C2
:
(
∀
A
,
C1
A
<
:
C2
A
)
-
∗
▷
(
∀
A
,
C1
A
<
:
C2
A
)
-
∗
(
∃
A
,
C1
A
)
<
:
(
∃
A
,
C2
A
).
(
∃
A
,
C1
A
)
<
:
(
∃
A
,
C2
A
).
Proof
.
Proof
.
iIntros
"#Hle"
(
v
)
"!>"
.
iDestruct
1
as
(
A
)
"H"
.
iExists
A
.
by
iApply
"Hle"
.
iIntros
"#Hle"
(
v
)
"!>"
.
iDestruct
1
as
(
A
)
"H"
.
iExists
A
.
by
iApply
"Hle"
.
...
...
theories/logrel/term_types.v
View file @
ee0d1bfc
...
@@ -27,7 +27,7 @@ Definition lty_sum {Σ} (A1 A2 : ltty Σ) : ltty Σ := Ltty (λ w,
...
@@ -27,7 +27,7 @@ Definition lty_sum {Σ} (A1 A2 : ltty Σ) : ltty Σ := Ltty (λ w,
Definition
lty_forall
`
{
heapG
Σ
}
{
k
}
(
C
:
lty
Σ
k
→
ltty
Σ
)
:
ltty
Σ
:
=
Definition
lty_forall
`
{
heapG
Σ
}
{
k
}
(
C
:
lty
Σ
k
→
ltty
Σ
)
:
ltty
Σ
:
=
Ltty
(
λ
w
,
∀
A
,
WP
w
#()
{{
ltty_car
(
C
A
)
}})%
I
.
Ltty
(
λ
w
,
∀
A
,
WP
w
#()
{{
ltty_car
(
C
A
)
}})%
I
.
Definition
lty_exist
{
Σ
k
}
(
C
:
lty
Σ
k
→
ltty
Σ
)
:
ltty
Σ
:
=
Definition
lty_exist
{
Σ
k
}
(
C
:
lty
Σ
k
→
ltty
Σ
)
:
ltty
Σ
:
=
Ltty
(
λ
w
,
∃
A
,
ltty_car
(
C
A
)
w
)%
I
.
Ltty
(
λ
w
,
∃
A
,
▷
ltty_car
(
C
A
)
w
)%
I
.
Definition
lty_ref_mut
`
{
heapG
Σ
}
(
A
:
ltty
Σ
)
:
ltty
Σ
:
=
Ltty
(
λ
w
,
Definition
lty_ref_mut
`
{
heapG
Σ
}
(
A
:
ltty
Σ
)
:
ltty
Σ
:
=
Ltty
(
λ
w
,
∃
(
l
:
loc
)
(
v
:
val
),
⌜
w
=
#
l
⌝
∗
l
↦
v
∗
▷
ltty_car
A
v
)%
I
.
∃
(
l
:
loc
)
(
v
:
val
),
⌜
w
=
#
l
⌝
∗
l
↦
v
∗
▷
ltty_car
A
v
)%
I
.
...
@@ -115,6 +115,9 @@ Section term_types.
...
@@ -115,6 +115,9 @@ Section term_types.
Global
Instance
lty_forall_ne
`
{
heapG
Σ
}
k
n
:
Global
Instance
lty_forall_ne
`
{
heapG
Σ
}
k
n
:
Proper
(
pointwise_relation
_
(
dist
n
)
==>
dist
n
)
(@
lty_forall
Σ
_
k
).
Proper
(
pointwise_relation
_
(
dist
n
)
==>
dist
n
)
(@
lty_forall
Σ
_
k
).
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
Global
Instance
lty_exist_contractive
k
n
:
Proper
(
pointwise_relation
_
(
dist_later
n
)
==>
dist
n
)
(@
lty_exist
Σ
k
).
Proof
.
solve_contractive
.
Qed
.
Global
Instance
lty_exist_ne
k
n
:
Global
Instance
lty_exist_ne
k
n
:
Proper
(
pointwise_relation
_
(
dist
n
)
==>
dist
n
)
(@
lty_exist
Σ
k
).
Proper
(
pointwise_relation
_
(
dist
n
)
==>
dist
n
)
(@
lty_exist
Σ
k
).
Proof
.
solve_proper
.
Qed
.
Proof
.
solve_proper
.
Qed
.
...
...
theories/logrel/term_typing_rules.v
View file @
ee0d1bfc
...
@@ -240,19 +240,22 @@ Section properties.
...
@@ -240,19 +240,22 @@ Section properties.
wp_apply
(
wp_wand
with
"(He [HΓ //])"
)
;
iIntros
(
w
)
"[HB $]"
.
by
iExists
M
.
wp_apply
(
wp_wand
with
"(He [HΓ //])"
)
;
iIntros
(
w
)
"[HB $]"
.
by
iExists
M
.
Qed
.
Qed
.
Lemma
ltyped_unpack
{
k
}
Γ
1
Γ
2
Γ
3
(
x
:
string
)
e
(
C
:
lty
Σ
k
→
ltty
Σ
)
A
:
Lemma
ltyped_unpack
{
k
}
Γ
1
Γ
2
Γ
3
x
e1
e2
(
C
:
lty
Σ
k
→
ltty
Σ
)
B
:
Γ
1
!!
x
=
Some
(
lty_exist
C
)
→
(
Γ
1
⊨
e1
:
∃
M
,
C
M
⫤
Γ
2
)
-
∗
(
∀
X
,
<![
x
:
=
C
X
]!>
Γ
1
⊨
e
:
A
⫤
Γ
2
)
-
∗
(
∀
Y
,
<![
x
:
=
C
Y
]!>
Γ
2
⊨
e2
:
B
⫤
Γ
3
)
-
∗
(
Γ
1
⊨
e
:
A
⫤
Γ
2
).
Γ
1
⊨
(
let
:
x
:
=
e1
in
e2
)
:
B
⫤
binder_delete
x
Γ
3
.
Proof
.
Proof
.
iIntros
(
Hx
)
"#He"
.
iIntros
(
vs
)
"!> HΓ"
.
iIntros
"#He1 #He2 !>"
.
iIntros
(
vs
)
"HΓ1"
=>
/=.
iDestruct
(
env_ltyped_lookup
with
"HΓ"
)
as
(
v
Hv
)
"[HB HΓ]"
;
first
done
.
wp_apply
(
wp_wand
with
"(He1 HΓ1)"
)
;
iIntros
(
v
)
"[HC HΓ2]"
.
iDestruct
(
"HB"
)
as
(
B
)
"HB"
.
iDestruct
"HC"
as
(
X
)
"HX"
.
wp_pures
.
iDestruct
(
env_ltyped_insert
_
_
x
with
"HB HΓ"
)
as
"HΓ"
.
iDestruct
(
env_ltyped_insert
_
_
x
with
"HX HΓ2"
)
as
"HΓ2"
.
rewrite
/
binder_insert
insert_delete
(
insert_id
_
_
_
Hv
).
iDestruct
(
"He2"
with
"HΓ2"
)
as
"He2'"
.
iApply
(
wp_wand
with
"(He HΓ)"
).
eauto
.
destruct
x
as
[|
x
]
;
rewrite
/=
-
?subst_map_insert
//.
wp_apply
(
wp_wand
with
"He2'"
).
iIntros
(
w
)
"[$ HΓ3]"
.
by
iApply
env_ltyped_delete
.
Qed
.
Qed
.
(** Mutable Reference properties *)
(** Mutable Reference properties *)
Lemma
ltyped_alloc
Γ
1
Γ
2
e
A
:
Lemma
ltyped_alloc
Γ
1
Γ
2
e
A
:
(
Γ
1
⊨
e
:
A
⫤
Γ
2
)
-
∗
(
Γ
1
⊨
e
:
A
⫤
Γ
2
)
-
∗
...
@@ -304,7 +307,7 @@ Section properties.
...
@@ -304,7 +307,7 @@ Section properties.
iFrame
"HΓ'"
.
iFrame
"HΓ'"
.
Qed
.
Qed
.
(**
Weak
Reference properties *)
(**
Shared
Reference properties *)
Lemma
ltyped_upgrade_shared
Γ
Γ
'
e
A
:
Lemma
ltyped_upgrade_shared
Γ
Γ
'
e
A
:
(
Γ
⊨
e
:
ref_mut
(
copy
A
)
⫤
Γ
'
)
-
∗
(
Γ
⊨
e
:
ref_mut
(
copy
A
)
⫤
Γ
'
)
-
∗
Γ
⊨
e
:
ref_shr
A
⫤
Γ
'
.
Γ
⊨
e
:
ref_shr
A
⫤
Γ
'
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment