Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FP
Stacked Borrows Coq
Commits
0bca5190
Commit
0bca5190
authored
Jul 07, 2019
by
Ralf Jung
Browse files
tweak simple rules
parent
bcb97508
Changes
3
Hide whitespace changes
Inline
Side-by-side
theories/opt/ex1.v
View file @
0bca5190
...
...
@@ -40,7 +40,7 @@ Proof.
sim_apply
sim_simple_let_place
=>/=
.
(
*
Write
*
)
rewrite
(
vrel_eq
_
_
_
AREL
).
sim_apply
sim_simple_write_local
;
[
solve_res
|
].
sim_apply
sim_simple_write_local
;
[
done
|
solve_res
|
].
intros
arg
->
.
simpl
.
sim_apply
sim_simple_let_val
=>/=
.
apply
sim_simple_place
.
...
...
@@ -72,6 +72,7 @@ Proof.
{
apply
Hdec
.
}
{
apply
has_main_insert
;
done
.
}
apply
sim_local_funs_insert
;
first
done
.
-
admit
.
-
exact
:
ex1_sim_body
.
-
(
*
FIXME
:
Needs
reflexivity
.
*
)
Admitted
.
...
...
theories/sim/local.v
View file @
0bca5190
...
...
@@ -176,5 +176,7 @@ Proof.
Qed
.
End
local
.
(
*
Definition
sim_mod_fun
*
)
Hint
Resolve
sim_local_body_mono
:
paco
.
theories/sim/simple.v
View file @
0bca5190
...
...
@@ -130,27 +130,28 @@ Proof.
intros
HH
σ
s
σ
t
<-<-
.
apply
sim_body_alloc_local
=>/=
.
exact
:
HH
.
Qed
.
Lemma
sim_simple_write_local
fs
ft
r
r
'
n
l
tg
Ts
Tt
v
v
'
css
cst
Φ
:
Lemma
sim_simple_write_local
fs
ft
r
r
'
n
l
tg
ty
v
v
'
css
cst
Φ
:
tsize
ty
=
1
%
nat
→
r
≡
r
'
⋅
res_mapsto
l
1
v
'
(
init_stack
(
Tagged
tg
))
→
(
∀
s
,
v
=
[
s
]
→
Φ
(
r
'
⋅
res_mapsto
l
1
s
(
init_stack
(
Tagged
tg
)))
n
(
ValR
[
☠
%
S
])
css
(
ValR
[
☠
%
S
])
cst
)
→
r
⊨ˢ
{
n
,
fs
,
ft
}
(
Place
l
(
Tagged
tg
)
Ts
<-
#
v
,
css
)
≥
(
Place
l
(
Tagged
tg
)
T
t
<-
#
v
,
cst
)
(
Place
l
(
Tagged
tg
)
ty
<-
#
v
,
css
)
≥
(
Place
l
(
Tagged
tg
)
t
y
<-
#
v
,
cst
)
:
Φ
.
Proof
.
Admitted
.
Lemma
sim_simple_retag_local
fs
ft
r
r
'
r
''
r
f
n
l
s
'
s
tg
m
ty
css
cst
Φ
:
Lemma
sim_simple_retag_local
fs
ft
r
r
'
r
''
r
s
n
l
s
'
s
tg
m
ty
css
cst
Φ
:
r
≡
r
'
⋅
res_mapsto
l
1
s
(
init_stack
(
Tagged
tg
))
→
arel
r
f
s
'
s
→
r
'
≡
r
''
⋅
r
f
→
arel
r
s
s
'
s
→
r
'
≡
r
''
⋅
r
s
→
(
∀
l_inner
tg_inner
hplt
,
let
s
:=
ScPtr
l_inner
(
Tagged
tg_inner
)
in
let
s
_new
:=
ScPtr
l_inner
(
Tagged
tg_inner
)
in
let
tk
:=
match
m
with
Mutable
=>
tkUnique
|
Immutable
=>
tkPub
end
in
match
m
with
|
Mutable
=>
is_Some
(
hplt
!!
l_inner
)
|
Immutable
=>
if
is_freeze
ty
then
is_Some
(
hplt
!!
l_inner
)
else
True
end
→
Φ
(
r
'
⋅
res_mapsto
l
1
s
(
init_stack
(
Tagged
tg
))
⋅
res_tag
tg_inner
tk
hplt
)
n
(
ValR
[
☠
%
S
])
css
(
ValR
[
☠
%
S
])
cst
)
→
Φ
(
r
'
'
⋅
rs
⋅
res_mapsto
l
1
s
_new
(
init_stack
(
Tagged
tg
))
⋅
res_tag
tg_inner
tk
hplt
)
n
(
ValR
[
☠
%
S
])
css
(
ValR
[
☠
%
S
])
cst
)
→
r
⊨ˢ
{
n
,
fs
,
ft
}
(
Retag
(
Place
l
(
Tagged
tg
)
(
Reference
(
RefPtr
m
)
ty
))
Default
,
css
)
≥
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment