Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iris
Manage
Activity
Members
Labels
Plan
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
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
Paolo G. Giarrusso
iris
Commits
1fb80e30
Verified
Commit
1fb80e30
authored
7 months ago
by
Sanjit Bhat
Browse files
Options
Downloads
Patches
Plain Diff
cleanup/move tests and improve changelog
parent
f112bfcd
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
CHANGELOG.md
+3
-1
3 additions, 1 deletion
CHANGELOG.md
tests/bi.ref
+7
-0
7 additions, 0 deletions
tests/bi.ref
tests/bi.v
+38
-0
38 additions, 0 deletions
tests/bi.v
tests/proofmode.ref
+0
-7
0 additions, 7 deletions
tests/proofmode.ref
tests/proofmode.v
+0
-33
0 additions, 33 deletions
tests/proofmode.v
with
48 additions
and
41 deletions
CHANGELOG.md
+
3
−
1
View file @
1fb80e30
...
...
@@ -38,7 +38,9 @@ lemma.
**Changes in `bi`:**
*
For derived connectives, add TC hints to destruct matches. (by Sanjit Bhat)
*
Add hints for
`match _ with _ end`
(and thus
`if _ then _ else`
and
`'(_, _)`
pair destructuring) for
`Persistent`
,
`Affine`
,
`Absorbing`
,
`Timeless`
, and
`Plain`
. (by Sanjit Bhat)
## Iris 4.2.0 (2024-04-12)
...
...
This diff is collapsed.
Click to expand it.
tests/bi.ref
+
7
−
0
View file @
1fb80e30
...
...
@@ -20,3 +20,10 @@ P : PROP
?p : "Persistent (■ P)"
"match_def_unfold_fail"
: string
The command has indeed failed with message:
Cannot infer this placeholder of type "Persistent (match_foo b)" (no type
class instance found) in environment:
PROP : bi
b : bool
This diff is collapsed.
Click to expand it.
tests/bi.v
+
38
−
0
View file @
1fb80e30
From
stdpp
Require
Import
strings
.
From
iris
.
bi
Require
Import
bi
plainly
big_op
.
Unset
Mangle
Names
.
...
...
@@ -100,3 +101,40 @@ Section internal_eq_ne.
Goal
NonExpansive
(
λ
x
,
(
⌜
a
=
x
⌝
:
PROP
)
%
I
)
.
Proof
.
solve_proper
.
Qed
.
End
internal_eq_ne
.
Section
tc_match
.
Context
{
PROP
:
bi
}
.
Lemma
match_persistent
:
Persistent
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
match_affine
:
Affine
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
match_absorbing
:
Absorbing
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
match_timeless
:
Timeless
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
match_plain
`{
!
BiPlainly
PROP
}
:
Plain
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
match_list_persistent
:
Persistent
(
PROP
:=
PROP
)
(
∃
l
:
list
nat
,
match
l
with
[]
=>
False
|
_
::
_
=>
False
end
)
.
Proof
.
apply
_
.
Qed
.
(* From https://gitlab.mpi-sws.org/iris/iris/-/issues/576. *)
Lemma
pair_timeless
`{
!
Timeless
(
emp
%
I
:
PROP
)}
(
m
:
gset
(
nat
*
nat
))
:
Timeless
(
PROP
:=
PROP
)
([
∗
set
]
'
(
k1
,
k2
)
∈
m
,
False
)
.
Proof
.
apply
_
.
Qed
.
Check
"match_def_unfold_fail"
.
(* Don't want hint to unfold def's. *)
Definition
match_foo
(
b
:
bool
)
:
PROP
:=
if
b
then
False
%
I
else
False
%
I
.
Lemma
match_def_unfold_fail
b
:
Persistent
(
match_foo
b
)
.
Proof
.
Fail
apply
_
.
Abort
.
End
tc_match
.
This diff is collapsed.
Click to expand it.
tests/proofmode.ref
+
0
−
7
View file @
1fb80e30
...
...
@@ -784,13 +784,6 @@ No applicable tactic.
: string
The command has indeed failed with message:
x is already used.
"test_TC_hint_for_connective_on_match"
: string
The command has indeed failed with message:
Cannot infer this placeholder of type "Persistent (match_foo b)" (no type
class instance found) in environment:
PROP : bi
b : bool
"elim_mod_accessor"
: string
1 goal
...
...
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
0
−
33
View file @
1fb80e30
...
...
@@ -1652,39 +1652,6 @@ Proof.
Fail
iIntros
(?
x
)
.
Abort
.
Check
"test_TC_hint_for_connective_on_match"
.
Lemma
test_match_persistent
:
Persistent
(
∃
b
:
bool
,
if
b
then
False
else
False
:
PROP
)
.
Proof
.
apply
_
.
Qed
.
Lemma
test_match_affine
:
Affine
(
∃
b
:
bool
,
if
b
then
False
else
False
:
PROP
)
.
Proof
.
apply
_
.
Qed
.
Lemma
test_match_absorbing
:
Absorbing
(
∃
b
:
bool
,
if
b
then
False
else
False
:
PROP
)
.
Proof
.
apply
_
.
Qed
.
Lemma
test_match_timeless
:
Timeless
(
∃
b
:
bool
,
if
b
then
False
else
False
:
PROP
)
.
Proof
.
apply
_
.
Qed
.
Lemma
test_match_plain
`{
!
BiPlainly
PROP
}
:
Plain
(
PROP
:=
PROP
)
(
∃
b
:
bool
,
if
b
then
False
else
False
)
.
Proof
.
apply
_
.
Qed
.
Lemma
test_match_list
:
Persistent
(
PROP
:=
PROP
)
(
∃
l
:
list
nat
,
match
l
with
_
=>
False
end
)
.
Proof
.
apply
_
.
Qed
.
(* From https://gitlab.mpi-sws.org/iris/iris/-/issues/576. *)
Lemma
test_match_pair
`{
!
Timeless
(
emp
%
I
:
PROP
)}
(
m
:
gset
(
nat
*
nat
))
:
Timeless
([
∗
set
]
'
(
k1
,
k2
)
∈
m
,
False
:
PROP
)
.
Proof
.
apply
_
.
Qed
.
(* Don't want hint to unfold def's. *)
Definition
match_foo
(
b
:
bool
)
:
PROP
:=
if
b
then
False
%
I
else
False
%
I
.
Lemma
test_match_def_unfold_fail
b
:
Persistent
(
match_foo
b
)
.
Proof
.
Fail
apply
_
.
Abort
.
End
tests
.
Section
parsing_tests
.
...
...
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