Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
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
Abhishek Anand
Iris
Commits
b052b2a2
Commit
b052b2a2
authored
9 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
use the new tactics to simplify ress_split
parent
961b94c1
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
algebra/upred_tactics.v
+7
-5
7 additions, 5 deletions
algebra/upred_tactics.v
barrier/proof.v
+8
-10
8 additions, 10 deletions
barrier/proof.v
with
15 additions
and
15 deletions
algebra/upred_tactics.v
+
7
−
5
View file @
b052b2a2
...
@@ -155,7 +155,7 @@ Tactic Notation "to_front" open_constr(Ps) :=
...
@@ -155,7 +155,7 @@ Tactic Notation "to_front" open_constr(Ps) :=
|
?P
::
?Ps
=>
|
?P
::
?Ps
=>
rewrite
?(
assoc
(
★
)
%
I
);
rewrite
?(
assoc
(
★
)
%
I
);
match
goal
with
match
goal
with
|
|
-
(
?Q
★
_)
%
I
⊑
_
=>
(*
test
if it is already at front. *)
|
|
-
(
?Q
★
_)
%
I
⊑
_
=>
(*
check
if it is already at front. *)
unify
P
Q
with
typeclass_instances
unify
P
Q
with
typeclass_instances
|
|
-
_
=>
find_pat
P
ltac
:(
fun
P
=>
rewrite
{
1
}[(_
★
P
)
%
I
]
comm
)
|
|
-
_
=>
find_pat
P
ltac
:(
fun
P
=>
rewrite
{
1
}[(_
★
P
)
%
I
]
comm
)
end
;
end
;
...
@@ -183,11 +183,12 @@ Tactic Notation "sep_split" "right:" open_constr(Ps) :=
...
@@ -183,11 +183,12 @@ Tactic Notation "sep_split" "right:" open_constr(Ps) :=
|
[]
=>
apply
sep_intro_True_r
|
[]
=>
apply
sep_intro_True_r
|
?P
::
?Ps
=>
|
?P
::
?Ps
=>
to_front
(
P
::
Ps
);
to_front
(
P
::
Ps
);
(* Run assoc length (ps) times *)
(* Run assoc length (Ps) times -- that is 1 - length(original Ps),
and it will turn the goal in just the right shape for sep_mono. *)
let
rec
nassoc
Ps
:=
let
rec
nassoc
Ps
:=
lazymatch
eval
hnf
in
Ps
with
lazymatch
eval
hnf
in
Ps
with
|
[]
=>
idtac
|
[]
=>
idtac
|
_
::
?Ps
=>
rewrite
assoc
;
nassoc
Ps
|
_
::
?Ps
=>
rewrite
(
assoc
(
★
)
%
I
)
;
nassoc
Ps
end
in
end
in
rewrite
[
X
in
_
⊑
X
]
lock
-
?(
assoc
(
★
)
%
I
);
rewrite
[
X
in
_
⊑
X
]
lock
-
?(
assoc
(
★
)
%
I
);
nassoc
Ps
;
rewrite
[
X
in
X
⊑
_]
comm
-
[
X
in
_
⊑
X
]
lock
;
nassoc
Ps
;
rewrite
[
X
in
X
⊑
_]
comm
-
[
X
in
_
⊑
X
]
lock
;
...
@@ -202,11 +203,12 @@ Tactic Notation "sep_split" "left:" open_constr(Ps) :=
...
@@ -202,11 +203,12 @@ Tactic Notation "sep_split" "left:" open_constr(Ps) :=
|
[]
=>
apply
sep_intro_True_l
|
[]
=>
apply
sep_intro_True_l
|
?P
::
?Ps
=>
|
?P
::
?Ps
=>
to_front
(
P
::
Ps
);
to_front
(
P
::
Ps
);
(* Run assoc length (ps) times *)
(* Run assoc length (Ps) times -- that is 1 - length(original Ps),
and it will turn the goal in just the right shape for sep_mono. *)
let
rec
nassoc
Ps
:=
let
rec
nassoc
Ps
:=
lazymatch
eval
hnf
in
Ps
with
lazymatch
eval
hnf
in
Ps
with
|
[]
=>
idtac
|
[]
=>
idtac
|
_
::
?Ps
=>
rewrite
assoc
;
nassoc
Ps
|
_
::
?Ps
=>
rewrite
(
assoc
(
★
)
%
I
)
;
nassoc
Ps
end
in
end
in
rewrite
[
X
in
_
⊑
X
]
lock
-
?(
assoc
(
★
)
%
I
);
rewrite
[
X
in
_
⊑
X
]
lock
-
?(
assoc
(
★
)
%
I
);
nassoc
Ps
;
rewrite
-
[
X
in
_
⊑
X
]
lock
;
nassoc
Ps
;
rewrite
-
[
X
in
_
⊑
X
]
lock
;
...
...
This diff is collapsed.
Click to expand it.
barrier/proof.v
+
8
−
10
View file @
b052b2a2
...
@@ -79,23 +79,21 @@ Proof.
...
@@ -79,23 +79,21 @@ Proof.
intros
.
rewrite
/
ress
!
sep_exist_l
.
apply
exist_elim
=>
Ψ
.
intros
.
rewrite
/
ress
!
sep_exist_l
.
apply
exist_elim
=>
Ψ
.
rewrite
-
(
exist_intro
(
<
[
i1
:=
R1
]
>
(
<
[
i2
:=
R2
]
>
Ψ
)))
.
rewrite
-
(
exist_intro
(
<
[
i1
:=
R1
]
>
(
<
[
i2
:=
R2
]
>
Ψ
)))
.
rewrite
[(
Π
★
{
set
_}
(
λ
_,
saved_prop_own
_
_))
%
I
](
big_sepS_delete
_
I
i
)
//.
rewrite
[(
Π
★
{
set
_}
(
λ
_,
saved_prop_own
_
_))
%
I
](
big_sepS_delete
_
I
i
)
//.
rewrite
!
assoc
[(_
★
(_
-★
_))
%
I
]
comm
!
assoc
[(_
★
▷
_)
%
I
]
comm
.
rewrite
!
assoc
[(_
★
_
i
_)
%
I
]
comm
!
assoc
[(_
★
_
i
_)
%
I
]
comm
-!
assoc
.
do
4
(
rewrite
big_sepS_insert
;
last
set_solver
)
.
do
4
(
rewrite
big_sepS_insert
;
last
set_solver
)
.
rewrite
!
fn_lookup_insert
fn_lookup_insert_ne
//
!
fn_lookup_insert
.
rewrite
!
fn_lookup_insert
fn_lookup_insert_ne
//
!
fn_lookup_insert
.
rewrite
3
!
assoc
.
apply
sep_mono
.
set
savedQ
:=
_
i
_
.
set
savedΨ
:=
_
i
_
.
-
rewrite
saved_prop_agree
later_equivI
/=.
strip_later
.
sep_split
left
:
[
savedQ
;
savedΨ
;
Q
-★
_;
▷
(_
-★
Π
★
{
set
I
}
_)]
%
I
.
apply
wand_intro_l
.
rewrite
[(_
★
(_
-★
Π
★
{
set
_}
_))
%
I
]
comm
!
assoc
wand_elim_r
.
-
rewrite
!
assoc
saved_prop_agree
later_equivI
/=.
strip_later
.
apply
wand_intro_l
.
to_front
[
P
;
P
-★
_]
%
I
.
rewrite
wand_elim_r
.
rewrite
(
big_sepS_delete
_
I
i
)
//.
rewrite
(
big_sepS_delete
_
I
i
)
//.
rewrite
[(_
★
Π
★
{
set
_}
_)
%
I
]
comm
[(_
★
Π
★
{
set
_}
_)
%
I
]
comm
-!
assoc
.
sep_split
right
:
[
Π
★
{
set
_}
_]
%
I
.
apply
sep_mono
.
+
apply
big_sepS_mono
;
[
done
|]
=>
j
.
rewrite
elem_of_difference
not_elem_of_singleton
=>
-
[??]
.
by
do
2
(
rewrite
fn_lookup_insert_ne
;
last
naive_solver
)
.
+
rewrite
!
assoc
.
+
rewrite
!
assoc
.
eapply
wand_apply_r'
;
first
done
.
eapply
wand_apply_r'
;
first
done
.
apply
:
(
eq_rewrite
(
Ψ
i
)
Q
(
λ
x
,
x
)
%
I
);
last
by
eauto
with
I
.
apply
:
(
eq_rewrite
(
Ψ
i
)
Q
(
λ
x
,
x
)
%
I
);
last
by
eauto
with
I
.
rewrite
eq_sym
.
eauto
with
I
.
rewrite
eq_sym
.
eauto
with
I
.
+
apply
big_sepS_mono
;
[
done
|]
=>
j
.
rewrite
elem_of_difference
not_elem_of_singleton
=>
-
[??]
.
by
do
2
(
rewrite
fn_lookup_insert_ne
;
last
naive_solver
)
.
-
rewrite
!
assoc
[(
saved_prop_own
i2
_
★
_)
%
I
]
comm
;
apply
sep_mono_r
.
-
rewrite
!
assoc
[(
saved_prop_own
i2
_
★
_)
%
I
]
comm
;
apply
sep_mono_r
.
apply
big_sepS_mono
;
[
done
|]=>
j
.
apply
big_sepS_mono
;
[
done
|]=>
j
.
rewrite
elem_of_difference
not_elem_of_singleton
=>
-
[??]
.
rewrite
elem_of_difference
not_elem_of_singleton
=>
-
[??]
.
...
...
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