Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
Abhishek Anand
Iris
Commits
6df33dac
Commit
6df33dac
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
More consistent naming for `pure_exec`.
parent
5e472be6
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
theories/heap_lang/lifting.v
+11
-11
11 additions, 11 deletions
theories/heap_lang/lifting.v
theories/program_logic/ectx_language.v
+1
-1
1 addition, 1 deletion
theories/program_logic/ectx_language.v
theories/program_logic/language.v
+1
-1
1 addition, 1 deletion
theories/program_logic/language.v
with
13 additions
and
13 deletions
theories/heap_lang/lifting.v
+
11
−
11
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
:
...
...
This diff is collapsed.
Click to expand it.
theories/program_logic/ectx_language.v
+
1
−
1
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
=
[])
→
...
...
This diff is collapsed.
Click to expand it.
theories/program_logic/language.v
+
1
−
1
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
.
...
...
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