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
Abel Nieto
Iris
Commits
cde85898
Commit
cde85898
authored
6 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
move printing-only tests to their own sections
parent
705bc223
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
tests/heap_lang.v
+6
-1
6 additions, 1 deletion
tests/heap_lang.v
tests/proofmode.ref
+16
-12
16 additions, 12 deletions
tests/proofmode.ref
tests/proofmode.v
+42
-35
42 additions, 35 deletions
tests/proofmode.v
with
64 additions
and
48 deletions
tests/heap_lang.v
+
6
−
1
View file @
cde85898
...
...
@@ -115,6 +115,11 @@ Section tests.
P
-∗
(
∀
Q
Φ
,
Q
-∗
WP
e
{{
Φ
}})
-∗
WP
e
{{
_,
True
}}
.
Proof
.
iIntros
"HP HW"
.
wp_apply
"HW"
.
iExact
"HP"
.
Qed
.
End
tests
.
Section
printing_tests
.
Context
`{
heapG
Σ
}
.
Lemma
wp_print_long_expr
(
fun1
fun2
fun3
:
expr
)
:
True
-∗
WP
let
:
"val1"
:=
fun1
#
()
in
let
:
"val2"
:=
fun2
"val1"
in
...
...
@@ -124,7 +129,7 @@ Section tests.
iIntros
"_"
.
Show
.
Abort
.
End
tests
.
End
printing_
tests
.
Lemma
heap_e_adequate
σ
:
adequate
NotStuck
heap_e
σ
(
=
#
2
)
.
Proof
.
eapply
(
heap_adequacy
heapΣ
)=>
?
.
by
apply
heap_e_spec
.
Qed
.
This diff is collapsed.
Click to expand it.
tests/proofmode.ref
+
16
−
12
View file @
cde85898
...
...
@@ -22,6 +22,19 @@
1 subgoal
PROP : sbi
P, Q : PROP
Persistent0 : Persistent P
Persistent1 : Persistent Q
============================
_ : P
_ : Q
--------------------------------------□
<affine> (P ∗ Q)
1 subgoal
PROP : sbi
BiFUpd0 : BiFUpd PROP
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P : PROP
============================
"HP" : P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
...
...
@@ -32,6 +45,7 @@
1 subgoal
PROP : sbi
BiFUpd0 : BiFUpd PROP
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P : PROP
============================
_ : P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
...
...
@@ -42,6 +56,7 @@
1 subgoal
PROP : sbi
BiFUpd0 : BiFUpd PROP
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P : PROP
============================
"HP" : TESTNOTATION {{ P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P |
...
...
@@ -52,6 +67,7 @@
1 subgoal
PROP : sbi
BiFUpd0 : BiFUpd PROP
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P : PROP
============================
_ : TESTNOTATION {{ P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P |
...
...
@@ -59,15 +75,3 @@
--------------------------------------∗
True
1 subgoal
PROP : sbi
P, Q : PROP
Persistent0 : Persistent P
Persistent1 : Persistent Q
============================
_ : P
_ : Q
--------------------------------------□
<affine> (P ∗ Q)
This diff is collapsed.
Click to expand it.
tests/proofmode.v
+
42
−
35
View file @
cde85898
...
...
@@ -37,41 +37,6 @@ Lemma demo_3 P1 P2 P3 :
P1
∗
P2
∗
P3
-∗
P1
∗
▷
(
P2
∗
∃
x
,
(
P3
∧
⌜
x
=
0
⌝
)
∨
P3
)
.
Proof
.
iIntros
"($ & $ & $)"
.
iNext
.
by
iExists
0
.
Qed
.
(* Test line breaking of long assumptions. *)
Section
linebreaks
.
Lemma
print_long_line
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
∗
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
-∗
True
.
Proof
.
iIntros
"HP"
.
Show
.
Abort
.
Lemma
print_long_line_anon
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
∗
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
-∗
True
.
Proof
.
iIntros
"?"
.
Show
.
Abort
.
(* This is specifically crafted such that not having the `hv` in
the proofmode notation breaks the output. *)
Local
Notation
"'TESTNOTATION' '{{' P '|' Q '}' '}'"
:=
(
P
∧
Q
)
%
I
(
format
"'TESTNOTATION' '{{' P '|' '/' Q '}' '}'"
)
:
bi_scope
.
Lemma
print_long_line
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
TESTNOTATION
{{
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
|
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
}}
-∗
True
.
Proof
.
iIntros
"HP"
.
Show
.
Abort
.
Lemma
print_long_line_anon
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
TESTNOTATION
{{
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
|
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
}}
-∗
True
.
Proof
.
iIntros
"?"
.
Show
.
Abort
.
End
linebreaks
.
Definition
foo
(
P
:
PROP
)
:=
(
P
-∗
P
)
%
I
.
Definition
bar
:
PROP
:=
(
∀
P
,
foo
P
)
%
I
.
...
...
@@ -513,3 +478,45 @@ Proof.
lazymatch
goal
with
|
-
coq_tactics
.
envs_entails
_
(
□
P
)
=>
done
end
.
Qed
.
End
tests
.
(** Test specifically if certain things print correctly. *)
Section
printing_tests
.
Context
{
PROP
:
sbi
}
`{
!
BiFUpd
PROP
}
.
Implicit
Types
P
Q
R
:
PROP
.
(* Test line breaking of long assumptions. *)
Section
linebreaks
.
Lemma
print_long_line
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
∗
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
-∗
True
.
Proof
.
iIntros
"HP"
.
Show
.
Abort
.
Lemma
print_long_line_anon
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
∗
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
-∗
True
.
Proof
.
iIntros
"?"
.
Show
.
Abort
.
(* This is specifically crafted such that not having the `hv` in
the proofmode notation breaks the output. *)
Local
Notation
"'TESTNOTATION' '{{' P '|' Q '}' '}'"
:=
(
P
∧
Q
)
%
I
(
format
"'TESTNOTATION' '{{' P '|' '/' Q '}' '}'"
)
:
bi_scope
.
Lemma
print_long_line
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
TESTNOTATION
{{
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
|
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
}}
-∗
True
.
Proof
.
iIntros
"HP"
.
Show
.
Abort
.
Lemma
print_long_line_anon
(
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
:
PROP
)
:
TESTNOTATION
{{
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
|
P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P_P
}}
-∗
True
.
Proof
.
iIntros
"?"
.
Show
.
Abort
.
End
linebreaks
.
End
printing_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