WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit fe99855

Browse files
committed
Revert "Revert "Add example from rocq-prover/rocq#16172 (#22)""
This reverts commit 19ae4cd.
1 parent 19ae4cd commit fe99855

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/exponential_extraction.v

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Module Type T.
2+
Parameter t : Type.
3+
End T.
4+
5+
Module F (X:T).
6+
(* number of occurences determines the exponential: here 4 *)
7+
Definition t : Type := X.t * X.t * X.t * X.t.
8+
End F.
9+
10+
Require Import Coq.extraction.Extraction.
11+
12+
Module A0. Definition t := nat. End A0.
13+
14+
Module A1 := F A0.
15+
Module A2 := F A1.
16+
Module A3 := F A2.
17+
Module A4 := F A3.
18+
Module A5 := F A4.
19+
Module A6 := F A5.
20+
Module A7 := F A6.
21+
Module A8 := F A7.
22+
Module A9 := F A8.
23+
24+
Set Boolean Equality Schemes.
25+
Time Record Foo5 := { foo5 : A5.t }. (* 0.037s *)
26+
Time Record Foo6 := { foo6 : A6.t }. (* 0.06 s *)
27+
Time Record Foo7 := { foo7 : A7.t }. (* 0.248s *)
28+
Time Record Foo8 := { foo8 : A8.t }. (* 1.015s *)
29+
Time Record Foo9 := { foo9 : A9.t }. (* 3.811s *)
30+
31+
Time Redirect "A5" Recursive Extraction A5.t. (* 0.009s *)
32+
Time Redirect "A6" Recursive Extraction A6.t. (* 0.041s *)
33+
Time Redirect "A7" Recursive Extraction A7.t. (* 0.177s *)
34+
Time Redirect "A8" Recursive Extraction A8.t. (* 0.744s *)
35+
Time Redirect "A9" Recursive Extraction A9.t. (* 3.12 s *)

0 commit comments

Comments
 (0)