Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
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
Model registry
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
Iris
stdpp
Commits
8dd6ba82
Commit
8dd6ba82
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Further improve tests.
parent
8d18a771
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!309
Use `SProp` to obtain better definitional equality for `pmap`, `gmap`, `gset`, `Qp`, and `coPset`
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/gmap.ref
+8
-0
8 additions, 0 deletions
tests/gmap.ref
tests/gmap.v
+11
-3
11 additions, 3 deletions
tests/gmap.v
with
19 additions
and
3 deletions
tests/gmap.ref
+
8
−
0
View file @
8dd6ba82
...
...
@@ -70,6 +70,14 @@ Failed to progress.
============================
bool_decide (∅ ⊆ {[1; 2; 3]}) = true
"pmap_insert_positives_test"
: string
= true
: bool
"gmap_insert_positives_test"
: string
= true
: bool
"gmap_insert_comm"
: string
1 goal
...
...
This diff is collapsed.
Click to expand it.
tests/gmap.v
+
11
−
3
View file @
8dd6ba82
...
...
@@ -76,11 +76,13 @@ Definition pmap_insert_positives_rev (n : positive) : Pmap unit :=
Pos
.
iter
(
λ
rec
p
m
,
rec
(
p
-
1
)
%
positive
(
<
[
p
:=
tt
]
>
m
))
(
λ
_
m
,
m
)
n
n
∅.
(* Test that the time is approximately n-log-n. We cannot test this on CI since
you get different timings all the time.
Definition
pmap_insert_positives_test
(
p
:
positive
)
:
bool
:=
bool_decide
(
pmap_insert_positives
p
=
pmap_insert_positives_rev
p
)
.
(* Test that the time is approximately n-log-n. We cannot test this on CI since
you get different timings all the time. Instead we just test for [256000], which
likely takes forever if the complexity is not n-log-n. *)
(*
Time Eval vm_compute in pmap_insert_positives_test 1000.
Time Eval vm_compute in pmap_insert_positives_test 2000.
Time Eval vm_compute in pmap_insert_positives_test 4000.
...
...
@@ -93,6 +95,8 @@ Time Eval vm_compute in pmap_insert_positives_test 256000.
Time Eval vm_compute in pmap_insert_positives_test 512000.
Time Eval vm_compute in pmap_insert_positives_test 1000000.
*)
Check
"pmap_insert_positives_test"
.
Eval
vm_compute
in
pmap_insert_positives_test
256000
.
Definition
gmap_insert_positives
(
n
:
positive
)
:
gmap
positive
unit
:=
Pos
.
iter
(
λ
rec
p
m
,
...
...
@@ -106,7 +110,9 @@ Definition gmap_insert_positives_test (p : positive) : bool :=
bool_decide
(
gmap_insert_positives
p
=
gmap_insert_positives_rev
p
)
.
(* Test that the time is approximately n-log-n. We cannot test this on CI since
you get different timings all the time.
you get different timings all the time. Instead we just test for [256000], which
likely takes forever if the complexity is not n-log-n. *)
(*
Time Eval vm_compute in gmap_insert_positives_test 1000.
Time Eval vm_compute in gmap_insert_positives_test 2000.
Time Eval vm_compute in gmap_insert_positives_test 4000.
...
...
@@ -119,6 +125,8 @@ Time Eval vm_compute in gmap_insert_positives_test 256000.
Time Eval vm_compute in gmap_insert_positives_test 512000.
Time Eval vm_compute in gmap_insert_positives_test 1000000.
*)
Check
"gmap_insert_positives_test"
.
Eval
vm_compute
in
gmap_insert_positives_test
256000
.
Check
"gmap_insert_comm"
.
Theorem
gmap_insert_comm
:
...
...
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