Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris-coq
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
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
Amin Timany
iris-coq
Commits
bab069fd
Commit
bab069fd
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
oO we can have a general bind rule... with very few assumptions about filling
parent
4d68e9b9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris_ht_rules.v
+39
-0
39 additions, 0 deletions
iris_ht_rules.v
with
39 additions
and
0 deletions
iris_ht_rules.v
+
39
−
0
View file @
bab069fd
...
...
@@ -93,6 +93,45 @@ Module Type IRIS_HT_RULES (RL : VIRA_T) (C : CORE_LANG) (R: IRIS_RES RL C) (WP:
{
assumption
.
}
Qed
.
(** Bind - in general **)
Section
Bind
.
Parameter
fill
:
expr
->
expr
.
Axiom
fill_step
:
forall
e1
σ1
e2
σ2
ef
,
prim_step
(
e1
,
σ1
)
(
e2
,
σ2
)
ef
<->
prim_step
(
fill
e1
,
σ1
)
(
fill
e2
,
σ2
)
ef
.
Axiom
fill_step_all
:
forall
e1
σ1
e2
σ2
ef
,
prim_step
(
fill
e1
,
σ1
)
(
e2
,
σ2
)
ef
->
exists
e2'
,
e2
=
fill
e2'
.
Axiom
fill_val
:
forall
e
,
is_value
(
fill
e
)
->
is_value
e
.
Program
Definition
plug_bind
safe
m
φ
:=
n
[(
fun
v
:
value
=>
wp
safe
m
(
fill
v
)
φ
)]
.
Next
Obligation
.
intros
v1
v2
EQv
.
destruct
n
as
[|
n
];
first
by
apply
:
dist_bound
.
hnf
in
EQv
.
now
rewrite
EQv
.
Qed
.
Lemma
wpBind
φ
e
safe
m
:
wp
safe
m
e
(
plug_bind
safe
m
φ
)
⊑
wp
safe
m
(
fill
e
)
φ
.
Proof
.
intros
w
n
He
.
revert
e
w
He
;
induction
n
using
wf_nat_ind
;
intros
;
rename
H
into
IH
.
destruct
(
is_value_dec
e
)
as
[
HVal
|
HNVal
];
[
clear
IH
|]
.
-
eapply
(
wpValue
_
HVal
)
in
He
.
exact
:
He
.
-
rewrite
->
unfold_wp
in
He
;
rewrite
unfold_wp
.
split
;
intros
.
{
exfalso
.
apply
HNVal
,
fill_val
,
HV
.
}
edestruct
He
as
[_
He'
];
try
eassumption
;
[];
clear
He
.
edestruct
He'
as
[
HS
HSf
];
try
eassumption
;
[];
clear
He'
HE
HD
.
split
;
last
first
.
{
intros
Heq
.
destruct
(
HSf
Heq
)
as
[?|[
σ'
[
e'
[
ef
Hstep
]]]];
first
contradiction
.
right
.
do
3
eexists
.
erewrite
<-
fill_step
.
eapply
Hstep
.
}
intros
.
destruct
(
fill_step_all
_
_
_
_
_
HStep
)
as
[
e''
Heq
]
.
subst
e'
.
rewrite
<-
fill_step
in
HStep
.
destruct
(
HS
_
_
_
HStep
)
as
(
wret
&
wfk
&
Hret
&
Hfk
&
HE
)
.
exists
wret
wfk
.
split
;
last
tauto
.
clear
Hfk
HE
.
eapply
IH
;
assumption
.
Qed
.
End
Bind
.
(** Mask weakening **)
Lemma
wpWeakenMask
safe
m1
m2
e
φ
(
HD
:
m1
⊑
m2
)
:
wp
safe
m1
e
φ
⊑
wp
safe
m2
e
φ
.
...
...
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