Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ReLoC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
ReLoC
Commits
06d66475
Commit
06d66475
authored
6 years ago
by
Dan Frumin
Browse files
Options
Downloads
Patches
Plain Diff
Separate out the _atomic tactics
Following Robbert's suggestion
parent
7b6135e6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
theories/logic/proofmode/tactics.v
+32
-25
32 additions, 25 deletions
theories/logic/proofmode/tactics.v
theories/tests/proofmode_tests.v
+3
-3
3 additions, 3 deletions
theories/tests/proofmode_tests.v
with
35 additions
and
28 deletions
theories/logic/proofmode/tactics.v
+
32
−
25
View file @
06d66475
...
...
@@ -232,19 +232,21 @@ Proof.
Qed
.
Tactic
Notation
"rel_load_l"
:=
let
solve_mapsto
_
:=
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
{_}
_)
%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"rel_load_l: cannot find"
l
"↦ ?"
in
iStartProof
;
rel_reshape_cont_l
ltac
:(
fun
K
e'
=>
(* Try to apply the simple load tactic first. If it doesn't work then apply the atomic load rule *)
first
[
eapply
(
tac_rel_load_l_simp
K
);
[
reflexivity
(** e = fill K !#l *)
|
iSolveTC
(** IntoLaters *)
|
iAssumptionCore
(** find l ↦ - *)
|
reflexivity
(** eres = fill K v *)
|
(** new goal *)
]
|
iApply
(
refines_load_l
K
)];
rel_finish
)
||
fail
"rel_load_l: cannot find 'Load'"
.
first
[
rel_reshape_cont_l
ltac
:(
fun
K
e'
=>
eapply
(
tac_rel_load_l_simp
K
);
first
reflexivity
)
|
fail
1
"rel_load_l: cannot find 'Load'"
];
(* the remaining goals are from tac_lel_load_l (except for the first one, which has already been solved by this point) *)
[
iSolveTC
(** IntoLaters *)
|
solve_mapsto
()
|
reflexivity
(** eres = fill K v *)
|
rel_finish
(** new goal *)
]
.
Tactic
Notation
"rel_load_l_atomic"
:=
rel_apply_l
refines_load_l
.
(* The structure for the tacticals on the right hand side is a bit
different. Because there is only one type of rules, we can report
...
...
@@ -309,20 +311,25 @@ Proof.
Qed
.
Tactic
Notation
"rel_store_l"
:=
let
solve_mapsto
_
:=
let
l
:=
match
goal
with
|
-
_
=
Some
(_,
(
?l
↦
_)
%
I
)
=>
l
end
in
iAssumptionCore
||
fail
"rel_store_l: cannot find"
l
"↦ₛ ?"
in
iStartProof
;
rel_reshape_cont_l
ltac
:(
fun
K
e'
=>
(* Try to apply the simple store tactic first. If it doesn't work then apply the atomic store rule *)
first
[
eapply
(
tac_rel_store_l_simpl
K
);
[
reflexivity
(** e = fill K !#l *)
|
iSolveTC
(** IntoLaters *)
|
iAssumptionCore
(** find l ↦ - *)
|
pm_reflexivity
||
fail
"rel_store_l: this shouldn't happen"
|
reflexivity
(** eres = fill K v *)
|
(** new goal *)
]
|
iApply
(
refines_store_l
K
)];
rel_finish
)
||
fail
"rel_store_l: cannot find 'Store'"
.
first
[
rel_reshape_cont_r
ltac
:(
fun
K
e'
=>
eapply
(
tac_rel_store_l_simpl
K
);
[
reflexivity
(** e = fill K (#l <- e') *)
|
iSolveTC
(** e' is a value *)
|
idtac
..])
|
fail
1
"rel_store_l: cannot find 'Store'"
];
(* the remaining goals are from tac_rel_store_l (except for the first one, which has already been solved by this point) *)
[
iSolveTC
(** IntoLaters *)
|
solve_mapsto
()
|
pm_reflexivity
||
fail
"rel_store_l: this should not happen O-:"
|
reflexivity
|
rel_finish
(** new goal *)
]
.
Tactic
Notation
"rel_store_l_atomic"
:=
rel_apply_l
refines_store_l
.
Tactic
Notation
"rel_store_r"
:=
let
solve_mapsto
_
:=
...
...
This diff is collapsed.
Click to expand it.
theories/tests/proofmode_tests.v
+
3
−
3
View file @
06d66475
...
...
@@ -61,9 +61,9 @@ Lemma test4 l r Γ N :
Proof
.
iIntros
"#IN Hr"
.
repeat
(
rel_load_r
||
rel_pure_r
)
.
rel_load_l
.
iInv
N
as
"?"
"Hcl"
.
iModIntro
.
iExists
_;
iFrame
.
rel_load_l
_atomic
.
iInv
N
as
"?"
"Hcl"
.
iModIntro
.
iExists
_;
iFrame
.
iNext
.
iIntros
"Hl"
.
iMod
(
"Hcl"
with
"Hl"
)
as
"_"
.
repeat
(
rel_pure_l
||
rel_load_l
)
.
repeat
rel_pure_l
.
rel_load_l
_atomic
.
iInv
N
as
"?"
"Hcl"
.
iModIntro
.
iExists
_;
iFrame
.
iNext
.
iIntros
"Hl"
.
iMod
(
"Hcl"
with
"Hl"
)
as
"_"
.
rel_pure_l
.
...
...
@@ -83,7 +83,7 @@ Proof.
iApply
(
wp_store
with
"Hl"
)
.
iNext
.
iIntros
"Hl"
.
by
iApply
"Hcl"
.
}
iNext
.
rel_pure_l
.
rel_pure_l
.
rel_load_l
.
iInv
N
as
"?"
"Hcl"
.
iModIntro
.
iExists
_;
iFrame
.
rel_load_l
_atomic
.
iInv
N
as
"?"
"Hcl"
.
iModIntro
.
iExists
_;
iFrame
.
iNext
.
iIntros
"Hl"
.
iMod
(
"Hcl"
with
"Hl"
)
as
"_"
.
repeat
rel_pure_l
.
rel_store_r
.
rel_pure_r
.
rel_pure_r
.
...
...
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