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
Pierre Roux
Iris
Commits
7f3a9fa8
Commit
7f3a9fa8
authored
3 years ago
by
Tej Chajed
Committed by
Ralf Jung
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for iRename, iTypeOf, and iInduction with multiple IHs
parent
7c7054b9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iris/proofmode/ltac_tactics.v
+2
-2
2 additions, 2 deletions
iris/proofmode/ltac_tactics.v
tests/proofmode.ref
+24
-0
24 additions, 0 deletions
tests/proofmode.ref
tests/proofmode.v
+34
-0
34 additions, 0 deletions
tests/proofmode.v
with
60 additions
and
2 deletions
iris/proofmode/ltac_tactics.v
+
2
−
2
View file @
7f3a9fa8
...
...
@@ -2301,9 +2301,9 @@ result in the following actions:
hypotheses containing the induction variable [x]
- Revert the pure hypotheses [x1..xn]
- Actuall perform induction
- Actuall
y
perform induction
- Introduce the
e
pure hypotheses [x1..xn]
- Introduce the pure hypotheses [x1..xn]
- Introduce the spatial hypotheses and intuitionistic hypotheses involving [x]
- Introduce the proofmode hypotheses [Hs]
*)
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.ref
+
24
−
0
View file @
7f3a9fa8
...
...
@@ -147,6 +147,20 @@ Tactic failure: iSpecialize: Q not persistent.
: string
The command has indeed failed with message:
Tactic failure: iSpecialize: (|==> P)%I not persistent.
"test_iInduction_multiple_IHs"
: string
1 goal
PROP : bi
l, t1 : tree
Φ : tree → PROP
============================
"Hleaf" : Φ leaf
"Hnode" : ∀ l0 r : tree, Φ l0 -∗ Φ r -∗ Φ (node l0 r)
"IH" : Φ l
"IH1" : Φ t1
--------------------------------------□
Φ (node l t1)
The command has indeed failed with message:
Tactic failure: iSpecialize: cannot instantiate (∀ _ : φ, P -∗ False)%I with
P.
...
...
@@ -210,6 +224,16 @@ Tactic failure: iSpecialize: cannot instantiate (⌜φ⌝ → P -∗ False)%I wi
: string
The command has indeed failed with message:
Tactic failure: iEval: %: unsupported selection pattern.
"test_iRename"
: string
1 goal
PROP : bi
P : PROP
============================
"X" : P
--------------------------------------□
P
"test_iFrame_later_1"
: string
1 goal
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
34
−
0
View file @
7f3a9fa8
...
...
@@ -678,6 +678,18 @@ Proof.
by
iApply
"IH"
.
Qed
.
Inductive
tree
:=
leaf
|
node
(
l
r
:
tree
)
.
Check
"test_iInduction_multiple_IHs"
.
Lemma
test_iInduction_multiple_IHs
(
t
:
tree
)
(
Φ
:
tree
→
PROP
)
:
□
Φ
leaf
-∗
□
(
∀
l
r
,
Φ
l
-∗
Φ
r
-∗
Φ
(
node
l
r
))
-∗
Φ
t
.
Proof
.
iIntros
"#Hleaf #Hnode"
.
iInduction
t
as
[|
l
r
]
"IH"
.
-
iExact
"Hleaf"
.
-
Show
.
(* should have "IH" and "IH1", since [node] has two trees *)
iApply
(
"Hnode"
with
"IH IH1"
)
.
Qed
.
Lemma
test_iIntros_start_proof
:
⊢@
{
PROP
}
True
.
Proof
.
...
...
@@ -890,6 +902,28 @@ Check "test_iSimpl_in4".
Lemma
test_iSimpl_in4
x
y
:
⌜
(
3
+
x
)
%
nat
=
y
⌝
-∗
⌜
S
(
S
(
S
x
))
=
y
⌝
:
PROP
.
Proof
.
iIntros
"H"
.
Fail
iSimpl
in
"%"
.
by
iSimpl
in
"H"
.
Qed
.
Check
"test_iRename"
.
Lemma
test_iRename
P
:
□
P
-∗
P
.
Proof
.
iIntros
"#H"
.
iRename
"H"
into
"X"
.
Show
.
iExact
"X"
.
Qed
.
(** [iTypeOf] is an internal tactic for the proofmode *)
Lemma
test_iTypeOf
Q
R
φ
:
□
Q
∗
R
∗
⌜
φ
⌝
-∗
True
.
Proof
.
iIntros
"(#HQ & H)"
.
lazymatch
iTypeOf
"HQ"
with
|
Some
(
true
,
Q
)
=>
idtac
|
?x
=>
fail
"incorrect iTypeOf HQ"
x
end
.
lazymatch
iTypeOf
"H"
with
|
Some
(
false
,
(
R
∗
⌜
φ
⌝
)
%
I
)
=>
idtac
|
?x
=>
fail
"incorrect iTypeOf H"
x
end
.
lazymatch
iTypeOf
"missing"
with
|
None
=>
idtac
|
?x
=>
fail
"incorrect iTypeOf missing"
x
end
.
Abort
.
Lemma
test_iPureIntro_absorbing
(
φ
:
Prop
)
:
φ
→
⊢@
{
PROP
}
<
absorb
>
⌜
φ
⌝.
Proof
.
intros
?
.
iPureIntro
.
done
.
Qed
.
...
...
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