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
Gaëtan Gilbert
Iris
Commits
7453ecb0
Commit
7453ecb0
authored
7 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Rename `wp_simpl` → `wp_expr_simpl` to emphasize that it only simplifies the expression part.
parent
af9bfce4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theories/heap_lang/proofmode.v
+12
-12
12 additions, 12 deletions
theories/heap_lang/proofmode.v
with
12 additions
and
12 deletions
theories/heap_lang/proofmode.v
+
12
−
12
View file @
7453ecb0
...
@@ -5,17 +5,17 @@ From iris.heap_lang Require Export tactics lifting.
...
@@ -5,17 +5,17 @@ From iris.heap_lang Require Export tactics lifting.
Set
Default
Proof
Using
"Type"
.
Set
Default
Proof
Using
"Type"
.
Import
uPred
.
Import
uPred
.
Lemma
tac_wp_
simp
l
`{
heapG
Σ
}
Δ
E
Φ
e
e'
:
Lemma
tac_wp_
expr_eva
l
`{
heapG
Σ
}
Δ
E
Φ
e
e'
:
e
=
e'
→
e
=
e'
→
envs_entails
Δ
(
WP
e'
@
E
{{
Φ
}})
→
envs_entails
Δ
(
WP
e
@
E
{{
Φ
}})
.
envs_entails
Δ
(
WP
e'
@
E
{{
Φ
}})
→
envs_entails
Δ
(
WP
e
@
E
{{
Φ
}})
.
Proof
.
by
intros
->
.
Qed
.
Proof
.
by
intros
->
.
Qed
.
Ltac
wp_eval
t
:=
Ltac
wp_
expr_
eval
t
:=
try
iStartProof
;
try
iStartProof
;
try
(
eapply
tac_wp_
simp
l
;
[
t
;
reflexivity
|])
.
try
(
eapply
tac_wp_
expr_eva
l
;
[
t
;
reflexivity
|])
.
Ltac
wp_simpl
:=
wp_eval
simpl
.
Ltac
wp_
expr_
simpl
:=
wp_
expr_
eval
simpl
.
Ltac
wp_simpl_subst
:=
wp_eval
simpl_subst
.
Ltac
wp_
expr_
simpl_subst
:=
wp_
expr_
eval
simpl_subst
.
Lemma
tac_wp_pure
`{
heapG
Σ
}
Δ
Δ'
E
e1
e2
φ
Φ
:
Lemma
tac_wp_pure
`{
heapG
Σ
}
Δ
Δ'
E
e1
e2
φ
Φ
:
PureExec
φ
e1
e2
→
PureExec
φ
e1
e2
→
...
@@ -46,7 +46,7 @@ Tactic Notation "wp_pure" open_constr(efoc) :=
...
@@ -46,7 +46,7 @@ Tactic Notation "wp_pure" open_constr(efoc) :=
[
apply
_
(* PureExec *)
[
apply
_
(* PureExec *)
|
try
fast_done
(* The pure condition for PureExec *)
|
try
fast_done
(* The pure condition for PureExec *)
|
apply
_
(* IntoLaters *)
|
apply
_
(* IntoLaters *)
|
wp_simpl_subst
;
try
wp_value_head
(* new goal *)
|
wp_
expr_
simpl_subst
;
try
wp_value_head
(* new goal *)
])
])
||
fail
"wp_pure: cannot find"
efoc
"in"
e
"or"
efoc
"is not a reduct"
||
fail
"wp_pure: cannot find"
efoc
"in"
e
"or"
efoc
"is not a reduct"
|
_
=>
fail
"wp_pure: not a 'wp'"
|
_
=>
fail
"wp_pure: not a 'wp'"
...
@@ -168,7 +168,7 @@ Tactic Notation "wp_apply" open_constr(lem) :=
...
@@ -168,7 +168,7 @@ Tactic Notation "wp_apply" open_constr(lem) :=
lazymatch
goal
with
lazymatch
goal
with
|
|
-
envs_entails
_
(
wp
?E
?e
?Q
)
=>
|
|
-
envs_entails
_
(
wp
?E
?e
?Q
)
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
reshape_expr
e
ltac
:(
fun
K
e'
=>
wp_bind_core
K
;
iApplyHyp
H
;
try
iNext
;
wp_simpl
)
||
wp_bind_core
K
;
iApplyHyp
H
;
try
iNext
;
wp_
expr_
simpl
)
||
lazymatch
iTypeOf
H
with
lazymatch
iTypeOf
H
with
|
Some
(_,
?P
)
=>
fail
"wp_apply: cannot apply"
P
|
Some
(_,
?P
)
=>
fail
"wp_apply: cannot apply"
P
end
end
...
@@ -187,7 +187,7 @@ Tactic Notation "wp_alloc" ident(l) "as" constr(H) :=
...
@@ -187,7 +187,7 @@ Tactic Notation "wp_alloc" ident(l) "as" constr(H) :=
|
first
[
intros
l
|
fail
1
"wp_alloc:"
l
"not fresh"
];
|
first
[
intros
l
|
fail
1
"wp_alloc:"
l
"not fresh"
];
eexists
;
split
;
eexists
;
split
;
[
env_cbv
;
reflexivity
||
fail
"wp_alloc:"
H
"not fresh"
[
env_cbv
;
reflexivity
||
fail
"wp_alloc:"
H
"not fresh"
|
wp_simpl
;
try
wp_value_head
]]
|
wp_
expr_
simpl
;
try
wp_value_head
]]
|
_
=>
fail
"wp_alloc: not a 'wp'"
|
_
=>
fail
"wp_alloc: not a 'wp'"
end
.
end
.
...
@@ -204,7 +204,7 @@ Tactic Notation "wp_load" :=
...
@@ -204,7 +204,7 @@ Tactic Notation "wp_load" :=
[
apply
_
[
apply
_
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_load: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_load: cannot find"
l
"↦ ?"
|
wp_simpl
;
try
wp_value_head
]
|
wp_
expr_
simpl
;
try
wp_value_head
]
|
_
=>
fail
"wp_load: not a 'wp'"
|
_
=>
fail
"wp_load: not a 'wp'"
end
.
end
.
...
@@ -220,7 +220,7 @@ Tactic Notation "wp_store" :=
...
@@ -220,7 +220,7 @@ Tactic Notation "wp_store" :=
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_store: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_store: cannot find"
l
"↦ ?"
|
env_cbv
;
reflexivity
|
env_cbv
;
reflexivity
|
wp_simpl
;
try
first
[
wp_pure
(
Seq
(
Lit
LitUnit
)
_)|
wp_value_head
]]
|
wp_
expr_
simpl
;
try
first
[
wp_pure
(
Seq
(
Lit
LitUnit
)
_)|
wp_value_head
]]
|
_
=>
fail
"wp_store: not a 'wp'"
|
_
=>
fail
"wp_store: not a 'wp'"
end
.
end
.
...
@@ -236,7 +236,7 @@ Tactic Notation "wp_cas_fail" :=
...
@@ -236,7 +236,7 @@ Tactic Notation "wp_cas_fail" :=
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
|
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"wp_cas_fail: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_cas_fail: cannot find"
l
"↦ ?"
|
try
congruence
|
try
congruence
|
wp_simpl
;
try
wp_value_head
]
|
wp_
expr_
simpl
;
try
wp_value_head
]
|
_
=>
fail
"wp_cas_fail: not a 'wp'"
|
_
=>
fail
"wp_cas_fail: not a 'wp'"
end
.
end
.
...
@@ -253,6 +253,6 @@ Tactic Notation "wp_cas_suc" :=
...
@@ -253,6 +253,6 @@ Tactic Notation "wp_cas_suc" :=
iAssumptionCore
||
fail
"wp_cas_suc: cannot find"
l
"↦ ?"
iAssumptionCore
||
fail
"wp_cas_suc: cannot find"
l
"↦ ?"
|
try
congruence
|
try
congruence
|
env_cbv
;
reflexivity
|
env_cbv
;
reflexivity
|
wp_simpl
;
try
wp_value_head
]
|
wp_
expr_
simpl
;
try
wp_value_head
]
|
_
=>
fail
"wp_cas_suc: not a 'wp'"
|
_
=>
fail
"wp_cas_suc: not a 'wp'"
end
.
end
.
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