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
I
iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonas Kastberg
iris
Commits
6df33dac
Commit
6df33dac
authored
Oct 04, 2017
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More consistent naming for `pure_exec`.
parent
5e472be6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
theories/heap_lang/lifting.v
theories/heap_lang/lifting.v
+11
-11
theories/program_logic/ectx_language.v
theories/program_logic/ectx_language.v
+1
-1
theories/program_logic/language.v
theories/program_logic/language.v
+1
-1
No files found.
theories/heap_lang/lifting.v
View file @
6df33dac
...
...
@@ -82,49 +82,49 @@ Qed.
Local
Ltac
solve_exec_safe
:
=
intros
;
subst
;
do
3
eexists
;
econstructor
;
eauto
.
Local
Ltac
solve_exec_puredet
:
=
simpl
;
intros
;
by
inv_head_step
.
Local
Ltac
solve_pureexec
:
=
Local
Ltac
solve_pure
_
exec
:
=
repeat
lazymatch
goal
with
|
H
:
IntoVal
?e
_
|-
_
=>
rewrite
-(
of_to_val
e
_
into_val
)
;
clear
H
|
H
:
AsRec
_
_
_
_
|-
_
=>
rewrite
H
;
clear
H
end
;
apply
det_head_step_pureexec
;
[
solve_exec_safe
|
solve_exec_puredet
].
apply
det_head_step_pure
_
exec
;
[
solve_exec_safe
|
solve_exec_puredet
].
Global
Instance
pure_rec
f
x
(
erec
e1
e2
:
expr
)
(
v2
:
val
)
`
{!
IntoVal
e2
v2
,
AsRec
e1
f
x
erec
,
Closed
(
f
:
b
:
x
:
b
:
[])
erec
}
:
PureExec
True
(
App
e1
e2
)
(
subst'
x
e2
(
subst'
f
e1
erec
)).
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_unop
op
e
v
v'
`
{!
IntoVal
e
v
}
:
PureExec
(
un_op_eval
op
v
=
Some
v'
)
(
UnOp
op
e
)
(
of_val
v'
).
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_binop
op
e1
e2
v1
v2
v'
`
{!
IntoVal
e1
v1
,
!
IntoVal
e2
v2
}
:
PureExec
(
bin_op_eval
op
v1
v2
=
Some
v'
)
(
BinOp
op
e1
e2
)
(
of_val
v'
).
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_if_true
e1
e2
:
PureExec
True
(
If
(
Lit
(
LitBool
true
))
e1
e2
)
e1
.
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_if_false
e1
e2
:
PureExec
True
(
If
(
Lit
(
LitBool
false
))
e1
e2
)
e2
.
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_fst
e1
e2
v1
v2
`
{!
IntoVal
e1
v1
,
!
IntoVal
e2
v2
}
:
PureExec
True
(
Fst
(
Pair
e1
e2
))
e1
.
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_snd
e1
e2
v1
v2
`
{!
IntoVal
e1
v1
,
!
IntoVal
e2
v2
}
:
PureExec
True
(
Snd
(
Pair
e1
e2
))
e2
.
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_case_inl
e0
v
e1
e2
`
{!
IntoVal
e0
v
}
:
PureExec
True
(
Case
(
InjL
e0
)
e1
e2
)
(
App
e1
e0
).
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
Global
Instance
pure_case_inr
e0
v
e1
e2
`
{!
IntoVal
e0
v
}
:
PureExec
True
(
Case
(
InjR
e0
)
e1
e2
)
(
App
e2
e0
).
Proof
.
solve_pureexec
.
Qed
.
Proof
.
solve_pure
_
exec
.
Qed
.
(** Heap *)
Lemma
wp_alloc
E
e
v
:
...
...
theories/program_logic/ectx_language.v
View file @
6df33dac
...
...
@@ -151,7 +151,7 @@ Section ectx_language.
econstructor
;
eauto
.
Qed
.
Lemma
det_head_step_pureexec
(
P
:
Prop
)
e1
e2
:
Lemma
det_head_step_pure
_
exec
(
P
:
Prop
)
e1
e2
:
(
∀
σ
,
P
→
head_reducible
e1
σ
)
→
(
∀
σ
1 e2
'
σ
2
efs
,
P
→
head_step
e1
σ
1 e2
'
σ
2
efs
→
σ
1
=
σ
2
∧
e2
=
e2'
∧
efs
=
[])
→
...
...
theories/program_logic/language.v
View file @
6df33dac
...
...
@@ -101,7 +101,7 @@ Section language.
P
→
prim_step
e1
σ
1 e2
'
σ
2
efs
→
σ
1
=
σ
2
∧
e2
=
e2'
∧
efs
=
[]
;
}.
Lemma
hoist_pred_pureexec
(
P
:
Prop
)
(
e1
e2
:
expr
Λ
)
:
Lemma
hoist_pred_pure
_
exec
(
P
:
Prop
)
(
e1
e2
:
expr
Λ
)
:
(
P
→
PureExec
True
e1
e2
)
→
PureExec
P
e1
e2
.
Proof
.
intros
HPE
.
split
;
intros
;
eapply
HPE
;
eauto
.
Qed
.
...
...
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