Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
c
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
c
Commits
0a87ae99
Commit
0a87ae99
authored
7 years ago
by
Léon Gondelman
Browse files
Options
Downloads
Patches
Plain Diff
add a_if_spec
parent
bb028004
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/c_translation/translation.v
+16
-5
16 additions, 5 deletions
theories/c_translation/translation.v
with
16 additions
and
5 deletions
theories/c_translation/translation.v
+
16
−
5
View file @
0a87ae99
...
@@ -92,7 +92,7 @@ Section proofs.
...
@@ -92,7 +92,7 @@ Section proofs.
awp
v1
R
(
λ
_,
U
(
awp
v2
R
Φ
))
-∗
awp
(
a_sequence
v1
v2
)
R
Φ
.
awp
v1
R
(
λ
_,
U
(
awp
v2
R
Φ
))
-∗
awp
(
a_sequence
v1
v2
)
R
Φ
.
Proof
.
Proof
.
iIntros
"HΦ"
.
do
2
awp_lam
.
iApply
awp_bind
.
iIntros
"HΦ"
.
do
2
awp_lam
.
iApply
awp_bind
.
iApply
(
awp_wand
_
(
λ
_,
U
(
awp
v2
R
Φ
))
%
I
_
_
with
"[HΦ]"
);
first
done
.
iApply
(
awp_wand
with
"[HΦ]"
);
first
done
.
iIntros
(
v
)
"H"
.
awp_lam
.
iApply
awp_bind
.
iApply
a_seq_spec
.
iIntros
(
v
)
"H"
.
awp_lam
.
iApply
awp_bind
.
iApply
a_seq_spec
.
iUnlock
.
by
awp_pure
_
.
iUnlock
.
by
awp_pure
_
.
Qed
.
Qed
.
...
@@ -213,8 +213,8 @@ Section proofs.
...
@@ -213,8 +213,8 @@ Section proofs.
Lemma
a_if_true_spec
R
(
e1
e2
:
val
)
Φ
:
Lemma
a_if_true_spec
R
(
e1
e2
:
val
)
Φ
:
awp
e1
R
Φ
-∗
awp
(
a_if
(
a_ret
#
true
)
e1
e2
)
R
Φ
.
awp
e1
R
Φ
-∗
awp
(
a_if
(
a_ret
#
true
)
e1
e2
)
R
Φ
.
Proof
.
Proof
.
unfold
a_if
.
iIntros
"HΦ"
.
iIntros
"HΦ"
.
awp_lam
.
awp_lam
.
awp_lam
.
awp_lam
.
do
4
awp_lam
.
iApply
awp_bind
.
iApply
awp_bind
.
iApply
awp_value
.
iApply
awp_value
.
awp_lam
.
by
awp_if_true
.
awp_lam
.
by
awp_if_true
.
...
@@ -223,10 +223,21 @@ Section proofs.
...
@@ -223,10 +223,21 @@ Section proofs.
Lemma
a_if_false_spec
R
(
e1
e2
:
val
)
Φ
:
Lemma
a_if_false_spec
R
(
e1
e2
:
val
)
Φ
:
awp
e2
R
Φ
-∗
awp
(
a_if
(
a_ret
#
false
)
e1
e2
)
R
Φ
.
awp
e2
R
Φ
-∗
awp
(
a_if
(
a_ret
#
false
)
e1
e2
)
R
Φ
.
Proof
.
Proof
.
unfold
a_if
.
iIntros
"HΦ"
.
iIntros
"HΦ"
.
awp_lam
.
awp_lam
.
awp_lam
.
awp_lam
.
do
4
awp_lam
.
iApply
awp_bind
.
iApply
awp_bind
.
iApply
awp_value
.
iApply
awp_value
.
awp_lam
.
by
awp_if_false
.
awp_lam
.
by
awp_if_false
.
Qed
.
Qed
.
Lemma
a_if_spec
R
(
e
e1
e2
:
val
)
Φ
:
awp
e
R
(
λ
cnd
,
(
⌜
cnd
=
#
true
⌝
∧
awp
e1
R
Φ
)
∨
(
⌜
cnd
=
#
false
⌝
∧
awp
e2
R
Φ
))
-∗
awp
(
a_if
e
e1
e2
)
R
Φ
.
Proof
.
iIntros
"HΦ"
.
do
3
awp_lam
.
iApply
awp_bind
.
iApply
(
awp_wand
with
"HΦ"
)
.
iIntros
(
v
)
"[[% H] | [% H]]"
;
subst
;
by
repeat
awp_pure
_
.
Qed
.
End
proofs
.
End
proofs
.
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