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
Maxime Dénès
iris-coq
Commits
9a064367
Commit
9a064367
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
lifting lemmas for CAS
parent
d633ec42
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
barrier/heap_lang.v
+2
-2
2 additions, 2 deletions
barrier/heap_lang.v
barrier/lifting.v
+52
-0
52 additions, 0 deletions
barrier/lifting.v
with
54 additions
and
2 deletions
barrier/heap_lang.v
+
2
−
2
View file @
9a064367
...
...
@@ -54,9 +54,9 @@ Inductive value :=
Definition
LamV
(
e
:
{
bind
expr
})
:=
RecV
(
e
.[
ren
(
+
1
)])
.
Definition
LitTrue
:=
InjL
LitUnit
.
Definition
Lit
V
True
:=
InjLV
LitUnitV
.
Definition
LitTrue
V
:=
InjLV
LitUnitV
.
Definition
LitFalse
:=
InjR
LitUnit
.
Definition
Lit
V
False
:=
InjRV
LitUnitV
.
Definition
LitFalse
V
:=
InjRV
LitUnitV
.
Fixpoint
v2e
(
v
:
value
)
:
expr
:=
match
v
with
...
...
This diff is collapsed.
Click to expand it.
barrier/lifting.v
+
52
−
0
View file @
9a064367
...
...
@@ -118,6 +118,58 @@ Proof.
+
done
.
Qed
.
Lemma
wp_cas_fail_pst
E
σ
l
e1
v1
e2
v2
v'
:
e2v
e1
=
Some
v1
→
e2v
e2
=
Some
v2
→
σ
!!
l
=
Some
v'
→
v'
<>
v1
→
ownP
(
Σ
:=
Σ
)
σ
⊑
wp
(
Σ
:=
Σ
)
E
(
Cas
(
Loc
l
)
e1
e2
)
(
λ
v'
,
■
(
v'
=
LitFalseV
)
∧
ownP
(
Σ
:=
Σ
)
σ
)
.
Proof
.
intros
Hvl
Hl
.
etransitivity
;
last
eapply
wp_lift_step
with
(
σ1
:=
σ
)
(
φ
:=
λ
e'
σ'
,
e'
=
LitFalse
∧
σ'
=
σ
);
last
first
.
-
intros
e2'
σ2'
ef
Hstep
.
inversion_clear
Hstep
;
first
done
.
(* FIXME this rewriting is rather ugly. *)
exfalso
.
rewrite
Hvl
in
Hv1
.
case
:
Hv1
=>?;
subst
v1
.
rewrite
Hlookup
in
H
.
case
:
H
=>?;
subst
v'
.
done
.
-
do
3
eexists
.
eapply
CasFailS
;
eassumption
.
-
reflexivity
.
-
reflexivity
.
-
rewrite
-
pvs_intro
.
rewrite
-
{
1
}[
ownP
σ
](
@
right_id
_
_
_
_
uPred
.
sep_True
)
.
apply
sep_mono
;
first
done
.
rewrite
-
later_intro
.
apply
forall_intro
=>
e2'
.
apply
forall_intro
=>
σ2'
.
apply
wand_intro_l
.
rewrite
right_id
.
rewrite
-
pvs_intro
.
apply
const_elim_l
.
intros
[
->
->
]
.
rewrite
-
wp_value'
;
last
reflexivity
.
apply
and_intro
.
+
by
apply
const_intro
.
+
done
.
Qed
.
Lemma
wp_cas_suc_pst
E
σ
l
e1
v1
e2
v2
:
e2v
e1
=
Some
v1
→
e2v
e2
=
Some
v2
→
σ
!!
l
=
Some
v1
→
ownP
(
Σ
:=
Σ
)
σ
⊑
wp
(
Σ
:=
Σ
)
E
(
Cas
(
Loc
l
)
e1
e2
)
(
λ
v'
,
■
(
v'
=
LitTrueV
)
∧
ownP
(
Σ
:=
Σ
)
(
<
[
l
:=
v2
]
>
σ
))
.
Proof
.
intros
Hvl
Hl
.
etransitivity
;
last
eapply
wp_lift_step
with
(
σ1
:=
σ
)
(
φ
:=
λ
e'
σ'
,
e'
=
LitTrue
∧
σ'
=
<
[
l
:=
v2
]
>
σ
);
last
first
.
-
intros
e2'
σ2'
ef
Hstep
.
move
:
H
.
inversion_clear
Hstep
=>
H
.
(* FIXME this rewriting is rather ugly. *)
+
exfalso
.
rewrite
H
in
Hlookup
.
case
:
Hlookup
=>?;
subst
vl
.
rewrite
Hvl
in
Hv1
.
case
:
Hv1
=>?;
subst
v1
.
done
.
+
rewrite
H
in
Hlookup
.
case
:
Hlookup
=>?;
subst
v1
.
rewrite
Hl
in
Hv2
.
case
:
Hv2
=>?;
subst
v2
.
done
.
-
do
3
eexists
.
eapply
CasSucS
;
eassumption
.
-
reflexivity
.
-
reflexivity
.
-
rewrite
-
pvs_intro
.
rewrite
-
{
1
}[
ownP
σ
](
@
right_id
_
_
_
_
uPred
.
sep_True
)
.
apply
sep_mono
;
first
done
.
rewrite
-
later_intro
.
apply
forall_intro
=>
e2'
.
apply
forall_intro
=>
σ2'
.
apply
wand_intro_l
.
rewrite
right_id
.
rewrite
-
pvs_intro
.
apply
const_elim_l
.
intros
[
->
->
]
.
rewrite
-
wp_value'
;
last
reflexivity
.
apply
and_intro
.
+
by
apply
const_intro
.
+
done
.
Qed
.
(** Base axioms for core primitives of the language: Stateless reductions *)
Lemma
wp_fork
E
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