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
Environments
Terraform modules
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
Adam
Iris
Commits
44508871
Commit
44508871
authored
8 months ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Some tests for legacy syntax and error messages.
parent
f4db0245
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
tests/proofmode.ref
+24
-0
24 additions, 0 deletions
tests/proofmode.ref
tests/proofmode.v
+58
-0
58 additions, 0 deletions
tests/proofmode.v
with
82 additions
and
0 deletions
tests/proofmode.ref
+
24
−
0
View file @
44508871
...
@@ -445,6 +445,20 @@ Tactic failure: iCombine: cannot find 'gives' clause for hypotheses
...
@@ -445,6 +445,20 @@ Tactic failure: iCombine: cannot find 'gives' clause for hypotheses
"IHr" : Φ r
"IHr" : Φ r
--------------------------------------□
--------------------------------------□
Φ (node l r)
Φ (node l r)
"test_iInduction_multiple_IHs_legacy"
: string
1 goal
PROP : bi
l, r : tree
Φ : tree → PROP
============================
"Hleaf" : Φ leaf
"Hnode" : ∀ l0 r0 : tree, Φ l0 -∗ Φ r0 -∗ Φ (node l0 r0)
"IH" : Φ l
"IH1" : Φ r
--------------------------------------□
Φ (node l r)
The command has indeed failed with message:
The command has indeed failed with message:
Tactic failure: iSpecialize: cannot instantiate (∀ _ : φ, P -∗ False)%I with
Tactic failure: iSpecialize: cannot instantiate (∀ _ : φ, P -∗ False)%I with
P.
P.
...
@@ -1164,6 +1178,16 @@ The command has indeed failed with message:
...
@@ -1164,6 +1178,16 @@ The command has indeed failed with message:
Tactic failure: sel_pat.parse: the term m
Tactic failure: sel_pat.parse: the term m
is expected to be a selection pattern (usually a string),
is expected to be a selection pattern (usually a string),
but has unexpected type nat.
but has unexpected type nat.
"iInduction_non_fresh_IH"
: string
The command has indeed failed with message:
Tactic failure: iIntro: "IH" not fresh.
The command has indeed failed with message:
Tactic failure: iIntro: "IH" not fresh.
"iInduction_non_fresh_Coq_IH"
: string
The command has indeed failed with message:
IH is already used.
"test_iIntros_let_entails_fail"
"test_iIntros_let_entails_fail"
: string
: string
The command has indeed failed with message:
The command has indeed failed with message:
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
58
−
0
View file @
44508871
...
@@ -1025,6 +1025,44 @@ Proof.
...
@@ -1025,6 +1025,44 @@ Proof.
iApply
(
"Hnode"
with
"IHl IHr"
)
.
iApply
(
"Hnode"
with
"IHl IHr"
)
.
Qed
.
Qed
.
(* Copies of the above tests for the legacy syntax of naming IHs *)
Lemma
test_iInduction_wf_legacy
(
x
:
nat
)
P
Q
:
□
P
-∗
Q
-∗
⌜
(
x
+
0
=
x
)
%
nat
⌝.
Proof
.
iIntros
"#HP HQ"
.
iInduction
(
lt_wf
x
)
as
[[|
x
]
_]
"IH"
;
simpl
;
first
done
.
rewrite
(
inj_iff
S
)
.
by
iApply
(
"IH"
with
"[%]"
);
first
lia
.
Qed
.
Lemma
test_iInduction_using_legacy
(
m
:
gmap
nat
nat
)
(
Φ
:
nat
→
nat
→
PROP
)
y
:
([
∗
map
]
x
↦
i
∈
m
,
Φ
y
x
)
-∗
([
∗
map
]
x
↦
i
∈
m
,
emp
∗
Φ
y
x
)
.
Proof
.
iIntros
"Hm"
.
iInduction
m
as
[|
i
x
m
?]
"IH"
using
map_ind
forall
(
y
)
.
-
by
rewrite
!
big_sepM_empty
.
-
rewrite
!
big_sepM_insert
//.
iDestruct
"Hm"
as
"[$ ?]"
.
by
iApply
"IH"
.
Qed
.
Lemma
test_iInduction_big_sepL_impl'
{
A
}
(
Φ
Ψ
:
nat
→
A
→
PROP
)
(
l1
l2
:
list
A
)
:
length
l1
=
length
l2
→
([
∗
list
]
k
↦
x
∈
l1
,
Φ
k
x
)
-∗
□
(
∀
k
x1
x2
,
⌜
l1
!!
k
=
Some
x1
⌝
-∗
⌜
l2
!!
k
=
Some
x2
⌝
-∗
Φ
k
x1
-∗
Ψ
k
x2
)
-∗
[
∗
list
]
k
↦
x
∈
l2
,
Ψ
k
x
.
Proof
.
iIntros
(
Hlen
)
"Hl #Himpl"
.
iInduction
l1
as
[|
x1
l1
]
"IH"
forall
(
Φ
Ψ
l2
Hlen
)
.
Abort
.
Check
"test_iInduction_multiple_IHs_legacy"
.
Lemma
test_iInduction_multiple_IHs_legacy
(
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
:
Lemma
test_iIntros_start_proof
:
⊢@
{
PROP
}
True
.
⊢@
{
PROP
}
True
.
Proof
.
Proof
.
...
@@ -2057,6 +2095,26 @@ Proof.
...
@@ -2057,6 +2095,26 @@ Proof.
Fail
iInduction
n
as
[|
n
IH
]
forall
m
.
Fail
iInduction
n
as
[|
n
IH
]
forall
m
.
Abort
.
Abort
.
Check
"iInduction_non_fresh_IH"
.
Lemma
iInduction_non_fresh_IH
Q
(
P
:
nat
→
PROP
)
n
:
□
Q
-∗
P
n
.
Proof
.
iIntros
"IH"
.
Fail
iInduction
n
as
[|
n
IH
]
.
Fail
iInduction
n
as
[|
n
]
"IH"
.
Abort
.
Check
"iInduction_non_fresh_Coq_IH"
.
Lemma
iInduction_non_fresh_Coq_IH
φ
(
P
:
nat
→
PROP
)
n
:
□
⌜
φ
⌝
-∗
P
n
.
Proof
.
iIntros
(
IH
)
.
(* Names for IHs should also be fresh in Coq context *)
Fail
iInduction
n
as
[|
n
IH
]
.
(* But for the legacy syntax this is no problem. *)
iInduction
n
as
[|
n
]
"IH"
.
Abort
.
Check
"test_iIntros_let_entails_fail"
.
Check
"test_iIntros_let_entails_fail"
.
Lemma
test_iIntros_let_entails_fail
P
:
Lemma
test_iIntros_let_entails_fail
P
:
let
Q
:=
(
P
∗
P
)
%
I
in
let
Q
:=
(
P
∗
P
)
%
I
in
...
...
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