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
d633ec42
Commit
d633ec42
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
rename physical state lifting lemmas
parent
155a869b
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
barrier/lifting.v
+6
-4
6 additions, 4 deletions
barrier/lifting.v
barrier/tests.v
+4
-4
4 additions, 4 deletions
barrier/tests.v
with
10 additions
and
8 deletions
barrier/lifting.v
+
6
−
4
View file @
d633ec42
...
...
@@ -11,7 +11,9 @@ Proof.
by
apply
(
wp_bind
(
Σ
:=
Σ
)
(
K
:=
fill
K
)),
fill_is_ctx
.
Qed
.
(** Base axioms for core primitives of the language: Stateful reductions *)
(** Base axioms for core primitives of the language: Stateful reductions.
These are the lemmas basd on the physical state; we will derive versions
based on a ghost "mapsto"-predicate later. *)
Lemma
wp_lift_step
E1
E2
(
φ
:
expr
→
state
→
Prop
)
Q
e1
σ1
:
E1
⊆
E2
→
to_val
e1
=
None
→
...
...
@@ -43,7 +45,7 @@ Qed.
(* TODO RJ: Figure out some better way to make the
postcondition a predicate over a *location* *)
Lemma
wp_alloc
E
σ
e
v
:
Lemma
wp_alloc
_pst
E
σ
e
v
:
e2v
e
=
Some
v
→
ownP
(
Σ
:=
Σ
)
σ
⊑
wp
(
Σ
:=
Σ
)
E
(
Alloc
e
)
(
λ
v'
,
∃
l
,
■
(
v'
=
LocV
l
∧
σ
!!
l
=
None
)
∧
ownP
(
Σ
:=
Σ
)
(
<
[
l
:=
v
]
>
σ
))
.
...
...
@@ -72,7 +74,7 @@ Proof.
+
done
.
Qed
.
Lemma
wp_load
E
σ
l
v
:
Lemma
wp_load
_pst
E
σ
l
v
:
σ
!!
l
=
Some
v
→
ownP
(
Σ
:=
Σ
)
σ
⊑
wp
(
Σ
:=
Σ
)
E
(
Load
(
Loc
l
))
(
λ
v'
,
■
(
v'
=
v
)
∧
ownP
(
Σ
:=
Σ
)
σ
)
.
Proof
.
...
...
@@ -93,7 +95,7 @@ Proof.
+
done
.
Qed
.
Lemma
wp_store
E
σ
l
e
v
v'
:
Lemma
wp_store
_pst
E
σ
l
e
v
v'
:
e2v
e
=
Some
v
→
σ
!!
l
=
Some
v'
→
ownP
(
Σ
:=
Σ
)
σ
⊑
wp
(
Σ
:=
Σ
)
E
(
Store
(
Loc
l
)
e
)
...
...
This diff is collapsed.
Click to expand it.
barrier/tests.v
+
4
−
4
View file @
d633ec42
...
...
@@ -38,23 +38,23 @@ Module LiftingTests.
Proof
.
move
=>
σ
E
.
rewrite
/
e
.
rewrite
-
(
wp_bind
_
_
(
LetCtx
EmptyCtx
e2
))
.
rewrite
-
wp_mono
.
{
eapply
wp_alloc
;
done
.
}
{
eapply
wp_alloc
_pst
;
done
.
}
move
=>
v
;
apply
exist_elim
=>
l
.
apply
const_elim_l
;
move
=>[
->
_]
{
v
}
.
rewrite
-
wp_lam
-
later_intro
.
asimpl
.
rewrite
-
(
wp_bind
_
_
(
SeqCtx
(
StoreRCtx
(
LocV
_)
(
PlusLCtx
EmptyCtx
_))
(
Load
(
Loc
_))))
.
rewrite
-
wp_mono
.
{
eapply
wp_load
.
apply
:
lookup_insert
.
}
(* RJ TODO: figure out why apply and eapply fail. *)
{
eapply
wp_load
_pst
.
apply
:
lookup_insert
.
}
(* RJ TODO: figure out why apply and eapply fail. *)
move
=>
v
;
apply
const_elim_l
;
move
=>
->
{
v
}
.
rewrite
-
(
wp_bind
_
_
(
SeqCtx
(
StoreRCtx
(
LocV
_)
EmptyCtx
)
(
Load
(
Loc
_))))
.
rewrite
-
wp_plus
-
later_intro
.
rewrite
-
(
wp_bind
_
_
(
SeqCtx
EmptyCtx
(
Load
(
Loc
_))))
.
rewrite
-
wp_mono
.
{
eapply
wp_store
;
first
reflexivity
.
apply
:
lookup_insert
.
}
{
eapply
wp_store
_pst
;
first
reflexivity
.
apply
:
lookup_insert
.
}
move
=>
v
;
apply
const_elim_l
;
move
=>
->
{
v
}
.
rewrite
-
wp_lam
-
later_intro
.
asimpl
.
rewrite
-
wp_mono
.
{
eapply
wp_load
.
apply
:
lookup_insert
.
}
{
eapply
wp_load
_pst
.
apply
:
lookup_insert
.
}
move
=>
v
;
apply
const_elim_l
;
move
=>
->
{
v
}
.
by
apply
const_intro
.
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