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
3c6012c2
Commit
3c6012c2
authored
Jul 06, 2019
by
Ralf Jung
Browse files
working sim_apply
parent
f8a383dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
theories/opt/ex1.v
View file @
3c6012c2
...
...
@@ -37,9 +37,8 @@ Proof.
apply
sim_body_init_call
.
simpl
.
(
*
Alloc
*
)
sim_bind
(
Alloc
_
)
(
Alloc
_
).
simpl
.
apply
sim_body_alloc_shared
.
simpl
.
intros
->
->
.
sim_apply
sim_body_alloc_local
.
simpl
.
(
*
Let
*
)
sim_
bind
(
Let
_
_
_
)
(
Let
_
_
_
)
.
sim_
apply
sim_body_let_place
.
simpl
.
Abort
.
theories/sim/refl_step.v
View file @
3c6012c2
...
...
@@ -1220,6 +1220,11 @@ Lemma sim_body_let_val fs ft r n x (vs1 vt1: value) es2 et2 σs σt Φ :
r
⊨
{
n
,
fs
,
ft
}
(
let
:
x
:=
vs1
in
es2
,
σ
s
)
≥
((
let
:
x
:=
vt1
in
et2
),
σ
t
)
:
Φ
.
Proof
.
apply
sim_body_let
;
eauto
.
Qed
.
Lemma
sim_body_let_place
fs
ft
r
n
x
ls
lt
ts
tt
tys
tyt
es2
et2
σ
s
σ
t
Φ
:
r
⊨
{
n
,
fs
,
ft
}
(
subst
x
(
Place
ls
ts
tys
)
es2
,
σ
s
)
≥
(
subst
x
(
Place
lt
tt
tyt
)
et2
,
σ
t
)
:
Φ
→
r
⊨
{
n
,
fs
,
ft
}
(
let
:
x
:=
Place
ls
ts
tys
in
es2
,
σ
s
)
≥
((
let
:
x
:=
Place
lt
tt
tyt
in
et2
),
σ
t
)
:
Φ
.
Proof
.
apply
sim_body_let
;
eauto
.
Qed
.
(
**
Ref
*
)
Lemma
sim_body_ref
fs
ft
r
n
l
tgs
tgt
Ts
Tt
σ
s
σ
t
Φ
:
r
⊨
{
n
,
fs
,
ft
}
(#[
ScPtr
l
tgs
],
σ
s
)
≥
(#[
ScPtr
l
tgt
],
σ
t
)
:
Φ
→
...
...
theories/sim/tactics.v
View file @
3c6012c2
...
...
@@ -32,3 +32,14 @@ Tactic Notation "sim_bind" open_constr(efocs) open_constr(efoct) :=
)
)
end
.
Tactic
Notation
"sim_apply"
open_constr
(
lem
)
:=
match
goal
with
|
|-
_
⊨
{
_
,
_
,
_
}
(
?
es
,
_
)
≥
(
?
et
,
_
)
:
_
=>
reshape_expr
es
ltac
:
(
fun
Ks
es
=>
reshape_expr
et
ltac
:
(
fun
Kt
et
=>
eapply
(
sim_body_bind
_
_
_
_
Ks
Kt
es
et
);
eapply
lem
)
)
end
.
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