Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Iris
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
Package registry
Model registry
Operate
Terraform modules
Monitor
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
William Mansky
Iris
Commits
eafd77e6
Commit
eafd77e6
authored
5 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
use equality instead of let binding
parent
242cee02
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
theories/heap_lang/lang.v
+2
-2
2 additions, 2 deletions
theories/heap_lang/lang.v
theories/heap_lang/lifting.v
+4
-4
4 additions, 4 deletions
theories/heap_lang/lifting.v
with
6 additions
and
6 deletions
theories/heap_lang/lang.v
+
2
−
2
View file @
eafd77e6
...
...
@@ -634,11 +634,11 @@ Inductive head_step : expr → state → list observation → expr → state →
[]
(
Val
$
LitV
LitUnit
)
(
state_upd_heap
<
[
l
:=
v
]
>
σ
)
[]
|
CompareExchangeS
l
v1
v2
vl
σ
:
|
CompareExchangeS
l
v1
v2
vl
σ
b
:
vals_cas_compare_safe
vl
v1
→
σ
.(
heap
)
!!
l
=
Some
vl
→
(* Crucially, this compares the same way as [EqOp]! *)
let
b
:
=
bool_decide
(
val_for_compare
vl
=
val_for_compare
v1
)
in
b
=
bool_decide
(
val_for_compare
vl
=
val_for_compare
v1
)
→
head_step
(
CompareExchange
(
Val
$
LitV
$
LitLoc
l
)
(
Val
v1
)
(
Val
v2
))
σ
[]
(
Val
$
PairV
(
LitV
$
LitBool
b
)
vl
)
(
if
b
then
state_upd_heap
<
[
l
:=
v2
]
>
σ
else
σ
)
...
...
This diff is collapsed.
Click to expand it.
theories/heap_lang/lifting.v
+
4
−
4
View file @
eafd77e6
...
...
@@ -382,7 +382,7 @@ Proof.
iIntros
(??
Φ
)
">Hl HΦ"
.
iApply
wp_lift_atomic_head_step_no_fork
;
auto
.
iIntros
(
σ1
κ
κs
n
)
"[Hσ Hκs] !>"
.
iDestruct
(
@
gen_heap_valid
with
"Hσ Hl"
)
as
%
?
.
iSplit
;
first
by
eauto
.
iNext
;
iIntros
(
v2'
σ2
efs
Hstep
);
inv_head_step
.
rewrite
/
b
bool_decide_false
//.
rewrite
bool_decide_false
//.
iModIntro
;
iSplit
=>
//.
iFrame
.
by
iApply
"HΦ"
.
Qed
.
Lemma
twp_cas_fail
s
E
l
q
v'
v1
v2
:
...
...
@@ -393,7 +393,7 @@ Proof.
iIntros
(??
Φ
)
"Hl HΦ"
.
iApply
twp_lift_atomic_head_step_no_fork
;
auto
.
iIntros
(
σ1
κs
n
)
"[Hσ Hκs] !>"
.
iDestruct
(
@
gen_heap_valid
with
"Hσ Hl"
)
as
%
?
.
iSplit
;
first
by
eauto
.
iIntros
(
κ
v2'
σ2
efs
Hstep
);
inv_head_step
.
rewrite
/
b
bool_decide_false
//.
rewrite
bool_decide_false
//.
iModIntro
;
iSplit
=>
//.
iSplit
;
first
done
.
iFrame
.
by
iApply
"HΦ"
.
Qed
.
...
...
@@ -405,7 +405,7 @@ Proof.
iIntros
(??
Φ
)
">Hl HΦ"
.
iApply
wp_lift_atomic_head_step_no_fork
;
auto
.
iIntros
(
σ1
κ
κs
n
)
"[Hσ Hκs] !>"
.
iDestruct
(
@
gen_heap_valid
with
"Hσ Hl"
)
as
%
?
.
iSplit
;
first
by
eauto
.
iNext
;
iIntros
(
v2'
σ2
efs
Hstep
);
inv_head_step
.
rewrite
/
b
bool_decide_true
//.
rewrite
bool_decide_true
//.
iMod
(
@
gen_heap_update
with
"Hσ Hl"
)
as
"[$ Hl]"
.
iModIntro
.
iSplit
=>
//.
iFrame
.
by
iApply
"HΦ"
.
Qed
.
...
...
@@ -417,7 +417,7 @@ Proof.
iIntros
(??
Φ
)
"Hl HΦ"
.
iApply
twp_lift_atomic_head_step_no_fork
;
auto
.
iIntros
(
σ1
κs
n
)
"[Hσ Hκs] !>"
.
iDestruct
(
@
gen_heap_valid
with
"Hσ Hl"
)
as
%
?
.
iSplit
;
first
by
eauto
.
iIntros
(
κ
v2'
σ2
efs
Hstep
);
inv_head_step
.
rewrite
/
b
bool_decide_true
//.
rewrite
bool_decide_true
//.
iMod
(
@
gen_heap_update
with
"Hσ Hl"
)
as
"[$ Hl]"
.
iModIntro
.
iSplit
=>
//.
iSplit
;
first
done
.
iFrame
.
by
iApply
"HΦ"
.
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