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
9ec31359
Commit
9ec31359
authored
7 years ago
by
Jacques-Henri Jourdan
Committed by
Ralf Jung
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Get rid of of_val_unlock.
parent
9080d27f
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
theories/lang/tactics.v
+2
-1
2 additions, 1 deletion
theories/lang/tactics.v
theories/typing/base.v
+1
-6
1 addition, 6 deletions
theories/typing/base.v
theories/typing/function.v
+6
-9
6 additions, 9 deletions
theories/typing/function.v
theories/typing/lib/panic.v
+1
-1
1 addition, 1 deletion
theories/typing/lib/panic.v
with
10 additions
and
17 deletions
theories/lang/tactics.v
+
2
−
1
View file @
9ec31359
...
@@ -185,7 +185,8 @@ Ltac solve_to_val :=
...
@@ -185,7 +185,8 @@ Ltac solve_to_val :=
match
goal
with
match
goal
with
|
|
-
to_val
?e
=
Some
?v
=>
|
|
-
to_val
?e
=
Some
?v
=>
let
e'
:=
W
.
of_expr
e
in
change
(
to_val
(
W
.
to_expr
e'
)
=
Some
v
);
let
e'
:=
W
.
of_expr
e
in
change
(
to_val
(
W
.
to_expr
e'
)
=
Some
v
);
apply
W
.
to_val_Some
;
simpl
;
unfold
W
.
to_expr
;
unlock
;
reflexivity
apply
W
.
to_val_Some
;
simpl
;
unfold
W
.
to_expr
;
((
unlock
;
exact
eq_refl
)
||
(
idtac
;
exact
eq_refl
))
|
|
-
is_Some
(
to_val
?e
)
=>
|
|
-
is_Some
(
to_val
?e
)
=>
let
e'
:=
W
.
of_expr
e
in
change
(
is_Some
(
to_val
(
W
.
to_expr
e'
)));
let
e'
:=
W
.
of_expr
e
in
change
(
is_Some
(
to_val
(
W
.
to_expr
e'
)));
apply
W
.
to_val_is_Some
,
(
bool_decide_unpack
_);
vm_compute
;
exact
I
apply
W
.
to_val_is_Some
,
(
bool_decide_unpack
_);
vm_compute
;
exact
I
...
...
This diff is collapsed.
Click to expand it.
theories/typing/base.v
+
1
−
6
View file @
9ec31359
...
@@ -14,13 +14,8 @@ Ltac solve_typing :=
...
@@ -14,13 +14,8 @@ Ltac solve_typing :=
(
typeclasses
eauto
with
lrust_typing
typeclass_instances
core
;
fail
)
||
(
typeclasses
eauto
with
lrust_typing
typeclass_instances
core
;
fail
)
||
(
typeclasses
eauto
with
lrust_typing
lrust_typing_merge
typeclass_instances
core
;
fail
)
.
(
typeclasses
eauto
with
lrust_typing
lrust_typing_merge
typeclass_instances
core
;
fail
)
.
Lemma
of_val_unlock
v
e
:
of_val
v
=
e
→
of_val
(
locked
v
)
=
e
.
Proof
.
by
unlock
.
Qed
.
Hint
Constructors
Forall
Forall2
elem_of_list
:
lrust_typing
.
Hint
Constructors
Forall
Forall2
elem_of_list
:
lrust_typing
.
Hint
Resolve
Hint
Resolve
submseteq_cons
submseteq_inserts_l
submseteq_inserts_r
of_val_unlock
submseteq_cons
submseteq_inserts_l
submseteq_inserts_r
:
lrust_typing
.
:
lrust_typing
.
Hint
Extern
1
(
@
eq
nat
_
(
Z
.
to_nat
_))
=>
Hint
Extern
1
(
@
eq
nat
_
(
Z
.
to_nat
_))
=>
...
...
This diff is collapsed.
Click to expand it.
theories/typing/function.v
+
6
−
9
View file @
9ec31359
...
@@ -397,10 +397,9 @@ Section typing.
...
@@ -397,10 +397,9 @@ Section typing.
Qed
.
Qed
.
Lemma
type_rec
{
A
}
E
L
fb
(
argsb
:
list
binder
)
ef
e
n
Lemma
type_rec
{
A
}
E
L
fb
(
argsb
:
list
binder
)
ef
e
n
(
fp
:
A
→
fn_params
n
)
T
`{
!
CopyC
T
,
!
SendC
T
}
:
(
fp
:
A
→
fn_params
n
)
T
`{
!
CopyC
T
,
!
SendC
T
,
Closed
_
e
}
:
ef
=
(
funrec
:
fb
argsb
:=
e
)
%
E
→
IntoVal
ef
(
funrec
:
fb
argsb
:=
e
)
→
n
=
length
argsb
→
n
=
length
argsb
→
Closed
(
fb
:
b
:
"return"
:
b
:
argsb
+
b
+
[])
e
→
□
(
∀
x
ϝ
(
f
:
val
)
k
(
args
:
vec
val
(
length
argsb
)),
□
(
∀
x
ϝ
(
f
:
val
)
k
(
args
:
vec
val
(
length
argsb
)),
typed_body
((
fp
x
).(
fp_E
)
ϝ
)
[
ϝ
⊑
ₗ
[]]
typed_body
((
fp
x
).(
fp_E
)
ϝ
)
[
ϝ
⊑
ₗ
[]]
[
k
◁
cont
([
ϝ
⊑
ₗ
[]],
λ
v
:
vec
_
1
,
[
v
!!!
0
◁
box
(
fp
x
).(
fp_ty
)])]
[
k
◁
cont
([
ϝ
⊑
ₗ
[]],
λ
v
:
vec
_
1
,
[
v
!!!
0
◁
box
(
fp
x
).(
fp_ty
)])]
...
@@ -410,8 +409,7 @@ Section typing.
...
@@ -410,8 +409,7 @@ Section typing.
(
subst_v
(
fb
::
BNamed
"return"
::
argsb
)
(
f
:::
k
:::
args
)
e
))
-∗
(
subst_v
(
fb
::
BNamed
"return"
::
argsb
)
(
f
:::
k
:::
args
)
e
))
-∗
typed_instruction_ty
E
L
T
ef
(
fn
fp
)
.
typed_instruction_ty
E
L
T
ef
(
fn
fp
)
.
Proof
.
Proof
.
iIntros
(
->
->
Hc
)
"#Hbody"
.
iIntros
(
tid
)
"#LFT _ $ $ #HT"
.
iApply
wp_value
.
iIntros
(
<-%
of_to_val
->
)
"#Hbody"
.
iIntros
(
tid
)
"#LFT _ $ $ #HT"
.
iApply
wp_value
.
{
unfold
IntoVal
.
simpl
.
rewrite
->
(
decide_left
Hc
)
.
done
.
}
rewrite
tctx_interp_singleton
.
iLöb
as
"IH"
.
iExists
_
.
iSplit
.
rewrite
tctx_interp_singleton
.
iLöb
as
"IH"
.
iExists
_
.
iSplit
.
{
simpl
.
rewrite
decide_left
.
done
.
}
{
simpl
.
rewrite
decide_left
.
done
.
}
iExists
fb
,
_,
argsb
,
e
,
_
.
iSplit
.
done
.
iSplit
.
done
.
iNext
.
iExists
fb
,
_,
argsb
,
e
,
_
.
iSplit
.
done
.
iSplit
.
done
.
iNext
.
...
@@ -422,10 +420,9 @@ Section typing.
...
@@ -422,10 +420,9 @@ Section typing.
Qed
.
Qed
.
Lemma
type_fn
{
A
}
E
L
(
argsb
:
list
binder
)
ef
e
n
Lemma
type_fn
{
A
}
E
L
(
argsb
:
list
binder
)
ef
e
n
(
fp
:
A
→
fn_params
n
)
T
`{
!
CopyC
T
,
!
SendC
T
}
:
(
fp
:
A
→
fn_params
n
)
T
`{
!
CopyC
T
,
!
SendC
T
,
Closed
_
e
}
:
ef
=
(
funrec
:
<>
argsb
:=
e
)
%
E
→
IntoVal
ef
(
funrec
:
<>
argsb
:=
e
)
→
n
=
length
argsb
→
n
=
length
argsb
→
Closed
(
"return"
:
b
:
argsb
+
b
+
[])
e
→
□
(
∀
x
ϝ
k
(
args
:
vec
val
(
length
argsb
)),
□
(
∀
x
ϝ
k
(
args
:
vec
val
(
length
argsb
)),
typed_body
((
fp
x
).(
fp_E
)
ϝ
)
[
ϝ
⊑
ₗ
[]]
typed_body
((
fp
x
).(
fp_E
)
ϝ
)
[
ϝ
⊑
ₗ
[]]
[
k
◁
cont
([
ϝ
⊑
ₗ
[]],
λ
v
:
vec
_
1
,
[
v
!!!
0
◁
box
(
fp
x
).(
fp_ty
)])]
[
k
◁
cont
([
ϝ
⊑
ₗ
[]],
λ
v
:
vec
_
1
,
[
v
!!!
0
◁
box
(
fp
x
).(
fp_ty
)])]
...
@@ -434,7 +431,7 @@ Section typing.
...
@@ -434,7 +431,7 @@ Section typing.
(
subst_v
(
BNamed
"return"
::
argsb
)
(
k
:::
args
)
e
))
-∗
(
subst_v
(
BNamed
"return"
::
argsb
)
(
k
:::
args
)
e
))
-∗
typed_instruction_ty
E
L
T
ef
(
fn
fp
)
.
typed_instruction_ty
E
L
T
ef
(
fn
fp
)
.
Proof
.
Proof
.
iIntros
(??
?
)
"#He"
.
iApply
type_rec
;
try
done
.
iIntros
"!# *"
.
iIntros
(??)
"#He"
.
iApply
type_rec
;
try
done
.
iIntros
"!# *"
.
iApply
typed_body_mono
;
last
iApply
"He"
;
try
done
.
iApply
typed_body_mono
;
last
iApply
"He"
;
try
done
.
eapply
contains_tctx_incl
.
by
constructor
.
eapply
contains_tctx_incl
.
by
constructor
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
theories/typing/lib/panic.v
+
1
−
1
View file @
9ec31359
...
@@ -18,7 +18,7 @@ Section panic.
...
@@ -18,7 +18,7 @@ Section panic.
Lemma
panic_type
:
typed_val
panic
(
fn
(
∅
)
→
emp
)
.
Lemma
panic_type
:
typed_val
panic
(
fn
(
∅
)
→
emp
)
.
Proof
.
Proof
.
intros
E
L
.
iApply
type_fn
;
[
solve_typing
..
|]
.
iIntros
"!# *"
.
intros
E
L
.
iApply
type_fn
;
[
done
|]
.
iIntros
"!# *"
.
inv_vec
args
.
iIntros
(
tid
)
"LFT HE Hna HL Hk HT /="
.
simpl_subst
.
inv_vec
args
.
iIntros
(
tid
)
"LFT HE Hna HL Hk HT /="
.
simpl_subst
.
by
iApply
wp_value
.
by
iApply
wp_value
.
Qed
.
Qed
.
...
...
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