Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lambda-rust
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
Model registry
Operate
Environments
Monitor
Service Desk
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
lambda-rust
Commits
80f014fe
There was a problem fetching the pipeline summary.
Commit
80f014fe
authored
7 years ago
by
Jacques-Henri Jourdan
Browse files
Options
Downloads
Patches
Plain Diff
Tactical support for null comparison.
parent
4625e064
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/lang/lifting.v
+18
-13
18 additions, 13 deletions
theories/lang/lifting.v
theories/lang/proofmode.v
+6
-1
6 additions, 1 deletion
theories/lang/proofmode.v
with
24 additions
and
14 deletions
theories/lang/lifting.v
+
18
−
13
View file @
80f014fe
...
...
@@ -240,19 +240,6 @@ Proof.
iApply
step_fupd_intro
;
done
.
Qed
.
(* TODO: wp_eq for locations, if needed.
Lemma wp_bin_op_heap E σ op l1 l2 l' :
bin_op_eval σ op l1 l2 l' →
{{{ ▷ ownP σ }}} BinOp op (Lit l1) (Lit l2) @ E
{{{ l'', RET LitV l''; ⌜bin_op_eval σ op l1 l2 l''⌝ ∗ ownP σ }}}.
Proof.
iIntros (? Φ) "HP HΦ". iApply ownP_lift_atomic_head_step; eauto.
iFrame "HP". iNext. iIntros (e2 σ2 efs Hs) "Ho".
inv_head_step; rewrite big_sepL_nil right_id.
iApply "HΦ". eauto.
Qed.
*)
Lemma
wp_bin_op_pure
E
op
l1
l2
l'
:
(
∀
σ
,
bin_op_eval
σ
op
l1
l2
l'
)
→
{{{
True
}}}
BinOp
op
(
Lit
l1
)
(
Lit
l2
)
@
E
...
...
@@ -290,6 +277,24 @@ Proof.
-
iNext
;
iIntros
(??
Heval
)
.
by
inversion_clear
Heval
;
inv_lit
.
Qed
.
Lemma
wp_eq_loc_0_r
E
(
l
:
loc
)
P
Φ
:
(
P
-∗
▷
Φ
(
LitV
false
))
→
P
-∗
WP
BinOp
EqOp
(
Lit
(
LitLoc
l
))
(
Lit
(
LitInt
0
))
@
E
{{
Φ
}}
.
Proof
.
iIntros
(
HΦ
)
"HP"
.
iApply
wp_bin_op_pure
.
by
intros
;
do
2
constructor
.
rewrite
HΦ
.
iNext
.
iIntros
(??
Heval
)
.
by
inversion_clear
Heval
;
inv_lit
.
Qed
.
Lemma
wp_eq_loc_0_l
E
(
l
:
loc
)
P
Φ
:
(
P
-∗
▷
Φ
(
LitV
false
))
→
P
-∗
WP
BinOp
EqOp
(
Lit
(
LitInt
0
))
(
Lit
(
LitLoc
l
))
@
E
{{
Φ
}}
.
Proof
.
iIntros
(
HΦ
)
"HP"
.
iApply
wp_bin_op_pure
.
by
intros
;
do
2
constructor
.
rewrite
HΦ
.
iNext
.
iIntros
(??
Heval
)
.
by
inversion_clear
Heval
;
inv_lit
.
Qed
.
(* TODO: wp_eq for locations, if needed. *)
Lemma
wp_offset
E
l
z
Φ
:
▷
Φ
(
LitV
$
LitLoc
$
shift_loc
l
z
)
-∗
WP
BinOp
OffsetOp
(
Lit
$
LitLoc
l
)
(
Lit
$
LitInt
z
)
@
E
{{
Φ
}}
.
...
...
This diff is collapsed.
Click to expand it.
theories/lang/proofmode.v
+
6
−
1
View file @
80f014fe
...
...
@@ -92,7 +92,12 @@ Tactic Notation "wp_op" :=
|
|
-
_
⊢
wp
?E
?e
?Q
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
match
eval
hnf
in
e'
with
|
BinOp
LeOp
_
_
=>
wp_bind_core
K
;
apply
wp_le
;
wp_finish
|
BinOp
EqOp
_
_
=>
wp_bind_core
K
;
apply
wp_eq_int
;
wp_finish
|
BinOp
EqOp
(
Lit
(
LitInt
_))
(
Lit
(
LitInt
_))
=>
wp_bind_core
K
;
apply
wp_eq_int
;
wp_finish
|
BinOp
EqOp
(
Lit
(
LitLoc
_))
(
Lit
(
LitInt
0
))
=>
wp_bind_core
K
;
apply
wp_eq_loc_0_r
;
wp_finish
|
BinOp
EqOp
(
Lit
(
LitInt
0
))
(
Lit
(
LitLoc
_))
=>
wp_bind_core
K
;
apply
wp_eq_loc_0_l
;
wp_finish
|
BinOp
OffsetOp
_
_
=>
wp_bind_core
K
;
etrans
;
[|
eapply
wp_offset
;
try
fast_done
];
wp_finish
|
BinOp
PlusOp
_
_
=>
...
...
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