Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
examples
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
Iris
examples
Commits
e70f486e
Verified
Commit
e70f486e
authored
6 years ago
by
Rodolphe Lepigre
Browse files
Options
Downloads
Patches
Plain Diff
Fix atomic snapshot example
parent
9fbc1013
No related branches found
No related tags found
1 merge request
!15
Fix atomic snapshot example
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
opam
+1
-1
1 addition, 1 deletion
opam
theories/logatom/snapshot/atomic_snapshot.v
+6
-6
6 additions, 6 deletions
theories/logatom/snapshot/atomic_snapshot.v
with
7 additions
and
7 deletions
opam
+
1
−
1
View file @
e70f486e
...
@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
...
@@ -9,6 +9,6 @@ build: [make "-j%{jobs}%"]
install: [make "install"]
install: [make "install"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
remove: ["rm" "-rf" "%{lib}%/coq/user-contrib/iris_examples"]
depends: [
depends: [
"coq-iris" { (= "dev.2019-03-
14.3.2d1c8352
") | (= "dev") }
"coq-iris" { (= "dev.2019-03-
26.0.0495f119
") | (= "dev") }
"coq-autosubst" { = "dev.coq86" }
"coq-autosubst" { = "dev.coq86" }
]
]
This diff is collapsed.
Click to expand it.
theories/logatom/snapshot/atomic_snapshot.v
+
6
−
6
View file @
e70f486e
...
@@ -365,10 +365,10 @@ Section atomic_snapshot.
...
@@ -365,10 +365,10 @@ Section atomic_snapshot.
wp_load
.
eauto
.
wp_load
.
eauto
.
Qed
.
Qed
.
Definition
val_to_bool
(
v
:
option
val
)
:
bool
:=
Definition
val_
list_
to_bool
(
v
:
list
val
)
:
bool
:=
match
v
with
match
v
with
|
Some
(
LitV
(
LitBool
b
)
)
=>
b
|
LitV
(
LitBool
b
)
::
_
=>
b
|
_
=>
false
|
_
=>
false
end
.
end
.
Lemma
readPair_spec
γ
p
:
Lemma
readPair_spec
γ
p
:
...
@@ -413,7 +413,7 @@ Section atomic_snapshot.
...
@@ -413,7 +413,7 @@ Section atomic_snapshot.
iMod
"AU"
as
(
xv
yv
)
"[Hpair Hclose]"
.
iMod
"AU"
as
(
xv
yv
)
"[Hpair Hclose]"
.
rewrite
/
pair_content
.
rewrite
/
pair_content
.
iDestruct
(
excl_sync
with
"Hp⚫ Hpair"
)
as
%
[
=
->
->
]
.
iDestruct
(
excl_sync
with
"Hp⚫ Hpair"
)
as
%
[
=
->
->
]
.
destruct
(
val_to_bool
proph_val
)
eqn
:
Hproph
.
destruct
(
val_
list_
to_bool
proph_val
)
eqn
:
Hproph
.
-
(* prophecy value is predicting that timestamp has not changed, so we commit *)
-
(* prophecy value is predicting that timestamp has not changed, so we commit *)
(* committing AU *)
(* committing AU *)
iMod
(
"Hclose"
with
"Hpair"
)
as
"HΦ"
.
iMod
(
"Hclose"
with
"Hpair"
)
as
"HΦ"
.
...
@@ -443,7 +443,7 @@ Section atomic_snapshot.
...
@@ -443,7 +443,7 @@ Section atomic_snapshot.
}
}
wp_load
.
wp_let
.
wp_proj
.
wp_let
.
wp_proj
.
wp_op
.
wp_load
.
wp_let
.
wp_proj
.
wp_let
.
wp_proj
.
wp_op
.
case_bool_decide
;
wp_let
;
wp_apply
(
wp_resolve_proph
with
"Hpr"
);
case_bool_decide
;
wp_let
;
wp_apply
(
wp_resolve_proph
with
"Hpr"
);
iIntros
(
->
)
;
wp_seq
;
wp_if
.
iIntros
(
vs'
)
"[Eq _]"
;
iDestruct
"Eq"
as
%
->
;
wp_seq
;
wp_if
.
+
inversion
H
;
subst
;
clear
H
.
wp_pures
.
+
inversion
H
;
subst
;
clear
H
.
wp_pures
.
assert
(
v_x2
=
v_y
)
as
->
.
{
assert
(
v_x2
=
v_y
)
as
->
.
{
assert
(
v_x2
<=
v_y
)
as
vneq
.
{
assert
(
v_x2
<=
v_y
)
as
vneq
.
{
...
@@ -479,7 +479,7 @@ Section atomic_snapshot.
...
@@ -479,7 +479,7 @@ Section atomic_snapshot.
}
}
wp_load
.
repeat
(
wp_let
;
wp_proj
)
.
wp_op
.
wp_let
.
wp_load
.
repeat
(
wp_let
;
wp_proj
)
.
wp_op
.
wp_let
.
wp_apply
(
wp_resolve_proph
with
"Hpr"
)
.
wp_apply
(
wp_resolve_proph
with
"Hpr"
)
.
iIntros
(
Heq
)
.
subst
.
iIntros
(
vs'
)
"[Heq _]"
;
iDestruct
"Heq"
as
%->
.
case_bool_decide
.
case_bool_decide
.
+
inversion
H
;
subst
;
clear
H
.
inversion
Hproph
.
+
inversion
H
;
subst
;
clear
H
.
inversion
Hproph
.
+
wp_seq
.
wp_if
.
iApply
"IH"
;
rewrite
/
is_pair
;
eauto
.
+
wp_seq
.
wp_if
.
iApply
"IH"
;
rewrite
/
is_pair
;
eauto
.
...
...
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