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
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
Janno
iris-coq
Commits
8f25b2f2
Commit
8f25b2f2
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
add a version of bind for ectx items
parent
b7401c68
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
heap_lang/heap_lang.v
+7
-0
7 additions, 0 deletions
heap_lang/heap_lang.v
heap_lang/lifting.v
+5
-1
5 additions, 1 deletion
heap_lang/lifting.v
heap_lang/tests.v
+5
-5
5 additions, 5 deletions
heap_lang/tests.v
with
17 additions
and
6 deletions
heap_lang/heap_lang.v
+
7
−
0
View file @
8f25b2f2
...
...
@@ -313,3 +313,10 @@ Proof.
exists
(
heap_lang
.
fill
K'
e2''
);
rewrite
heap_lang
.
fill_app
;
split
;
auto
.
econstructor
;
eauto
.
Qed
.
Global
Instance
heap_lang_ctx_item
Ki
:
LanguageCtx
heap_lang
(
heap_lang
.
fill_item
Ki
)
.
Proof
.
change
(
LanguageCtx
heap_lang
(
heap_lang
.
fill
[
Ki
]))
.
by
apply
_
.
Qed
.
This diff is collapsed.
Click to expand it.
heap_lang/lifting.v
+
5
−
1
View file @
8f25b2f2
...
...
@@ -13,7 +13,11 @@ Implicit Types K : ectx.
(** Bind. *)
Lemma
wp_bind
{
E
e
}
K
Q
:
wp
E
e
(
λ
v
,
wp
E
(
fill
K
(
of_val
v
))
Q
)
⊑
wp
E
(
fill
K
e
)
Q
.
Proof
.
apply
wp_bind
.
Qed
.
Proof
.
apply
weakestpre
.
wp_bind
.
Qed
.
Lemma
wp_bindi
{
E
e
}
Ki
Q
:
wp
E
e
(
λ
v
,
wp
E
(
fill_item
Ki
(
of_val
v
))
Q
)
⊑
wp
E
(
fill_item
Ki
e
)
Q
.
Proof
.
apply
weakestpre
.
wp_bind
.
Qed
.
(** Base axioms for core primitives of the language: Stateful reductions. *)
Lemma
wp_alloc_pst
E
σ
e
v
Q
:
...
...
This diff is collapsed.
Click to expand it.
heap_lang/tests.v
+
5
−
5
View file @
8f25b2f2
...
...
@@ -34,9 +34,9 @@ Module LiftingTests.
rewrite
-
later_intro
.
apply
forall_intro
=>
l
.
apply
wand_intro_l
.
rewrite
right_id
.
apply
const_elim_l
;
move
=>_
.
rewrite
-
later_intro
.
asimpl
.
rewrite
-
(
wp_bind
[
SeqCtx
(
Load
(
Loc
_))
]
)
.
rewrite
-
(
wp_bind
[
StoreRCtx
(
LocV
_)
]
)
.
rewrite
-
(
wp_bind
[
PlusLCtx
_
]
)
.
rewrite
-
(
wp_bind
i
(
SeqCtx
(
Load
(
Loc
_))
)
)
.
rewrite
-
(
wp_bind
i
(
StoreRCtx
(
LocV
_)
)
)
.
rewrite
-
(
wp_bind
i
(
PlusLCtx
_
)
)
.
rewrite
-
wp_load_pst
;
first
(
apply
sep_intro_True_r
;
first
done
);
last
first
.
{
by
rewrite
lookup_insert
.
}
(* RJ TODO: figure out why apply and eapply fail. *)
rewrite
-
later_intro
.
apply
wand_intro_l
.
rewrite
right_id
.
...
...
@@ -75,7 +75,7 @@ Module LiftingTests.
(* Go on. *)
rewrite
-
(
wp_let
_
_
(
FindPred'
(
LitNat
n1
)
(
Var
0
)
(
LitNat
n2
)
(
FindPred
$
LitNat
n2
)))
.
rewrite
-
wp_plus
.
asimpl
.
rewrite
-
(
wp_bind
[
CaseCtx
_
_
]
)
.
rewrite
-
(
wp_bind
i
(
CaseCtx
_
_
)
)
.
rewrite
-!
later_intro
/=.
apply
wp_lt
;
intros
Hn12
.
*
(* TODO RJ: It would be better if we could use wp_if_true here
...
...
@@ -97,7 +97,7 @@ Module LiftingTests.
▷
Q
(
LitNatV
$
pred
n
)
⊑
wp
E
(
App
Pred
(
LitNat
n
))
Q
.
Proof
.
rewrite
-
wp_lam
//.
asimpl
.
rewrite
-
(
wp_bind
[
CaseCtx
_
_
]
)
.
rewrite
-
(
wp_bind
i
(
CaseCtx
_
_
)
)
.
apply
later_mono
,
wp_le
=>
Hn
.
-
rewrite
-
wp_case_inl
//.
rewrite
-!
later_intro
-
wp_value'
//.
...
...
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