François Pottier
a1329040ec
Add a direct (primitive) implementation of [pure].
2022-01-20 09:38:08 +01:00
François Pottier
b939cea769
A comment.
2022-01-20 09:38:08 +01:00
François Pottier
e74e60ef37
Infer: add [translate_with_hook].
...
In the hope of separately benchmarking solving and elaboration.
2022-01-20 09:38:08 +01:00
François Pottier
987468b14d
In [CConj], impose left-to-right evaluation of the semantic actions.
2022-01-20 09:38:08 +01:00
François Pottier
21a9405d75
Add [make quick].
2022-01-19 17:38:45 +01:00
François Pottier
9d684d32d3
TODO: suggest adding an `ignore` combinator.
2022-01-18 09:03:05 +01:00
POTTIER Francois
927aaee734
Merge branch 'more-infix-hunting' into 'master'
...
Solver: remove (<$$>), (^&) from implementation and documentation
See merge request fpottier/inferno!34
2022-01-18 08:02:33 +00:00
François Pottier
741f673aa5
TODO.
2022-01-17 21:58:26 +01:00
Gabriel Scherer
d5da305909
Solver: remove (<$$>), (^&) from implementation and documentation
...
Those infix operators were previously removed from the interface
to gently push people to using let+/and+ instead, but
they remained defind internally and mentioned
in some places of the documentation.
2022-01-17 16:19:50 +01:00
François Pottier
011697ea42
TODO.
2022-01-17 09:56:40 +01:00
François Pottier
d25efc1ecc
Remove a TODO item.
2022-01-17 09:54:08 +01:00
François Pottier
1c7cce48aa
Avoid a use of [Option.map].
...
A call to [map] is now built into [G.fresh].
Memory allocation goes from 68.4M to 67.3M.
2022-01-16 17:59:09 +01:00
François Pottier
c987e78e89
Inline another use of [Option.iter].
...
Memory allocation goes down to 68.4M.
2022-01-16 17:50:17 +01:00
François Pottier
c77b55ea55
Structure.Option: manually inline [Option.iter] and [Option.map].
...
Memory allocation goes down from 70.5M to 69.3M.
2022-01-16 17:48:18 +01:00
François Pottier
a3273ca66c
Structure.Option: save one memory allocation when possible.
...
Memory allocation goes from 70.6M down to 70.5M.
2022-01-16 17:43:37 +01:00
François Pottier
534553c347
In [Data.conjunction], do not allocate a new [data] record.
...
Memory allocation in the micro-benchmark goes from 72.5M down to 70.6M.
2022-01-16 17:38:24 +01:00
François Pottier
f23a6cf0c5
Unifier, Generalize: reduce the number of calls to [UnionFind.get].
...
Use IntMap instead of VarMap.
Many little accessors disappear, replaced by a single call to [get]
followed with record accesses.
Memory allocation on the micro-benchmark goes down from 73M to 72.5M.
2022-01-16 16:03:43 +01:00
François Pottier
669e4805d7
TODO.
2022-01-15 18:14:47 +01:00
François Pottier
2ccb132c80
Move the [id] field into the type [data] in Generalization.
...
This is slightly artificial and makes the unifier's API slightly more
complex, but allows saving an indirection.
Memory allocation on the benchmark goes down from 74M to 73M.
2022-01-15 18:10:04 +01:00
François Pottier
c1c5ed2f1d
Display the most important statistics in color. Gotta love this.
2022-01-15 17:32:16 +01:00
François Pottier
748d918c92
Measure space consumption as well.
2022-01-15 17:30:06 +01:00
François Pottier
e62a3f08c3
Rename Time to Measure.
2022-01-15 17:16:41 +01:00
François Pottier
950fd48379
BenchMLRandom: allowing setting the seed on the command line.
2022-01-15 17:11:37 +01:00
François Pottier
8f0ef51242
RandomML: produce fewer [let] bindings and type annotations.
2022-01-15 17:11:12 +01:00
François Pottier
886e81d0e3
Add a benchmark. Use [make bench] to run it.
2022-01-15 14:53:18 +01:00
François Pottier
aaf3038549
Add RandomML.mli.
2022-01-15 14:53:04 +01:00
François Pottier
70a4c31331
Move the random term generator to a separate file.
2022-01-15 12:38:27 +01:00
François Pottier
f70717fc92
TestMLRandom: some cleanup.
2022-01-15 12:32:38 +01:00
François Pottier
ee7a369b81
TestML: mark some terms unused. Fix a typo where a test was not run.
2022-01-15 11:58:27 +01:00
François Pottier
7cf5fbe22e
Enable warnings in the test programs.
2022-01-15 11:56:54 +01:00
François Pottier
ba4bc0d048
TestMLRandom: remove [size] (unused).
2022-01-15 11:53:46 +01:00
François Pottier
b69afb9c87
Add empty .mli files for the test programs.
2022-01-15 11:52:55 +01:00
François Pottier
3f4f6855b0
Add the tests [boom 0] to [boom 4].
...
Unfortunately [boom 5] is already too expensive.
2022-01-14 17:11:56 +01:00
François Pottier
50fcb3eb28
Clean up and organize the TODO.
2022-01-14 00:12:50 +01:00
François Pottier
bc70bf26e5
Let [make test] test both settings of [rectypes].
...
[make test] now runs in about 15 seconds.
11797 out of 216000 tested terms (5.5%) are well-typed.
2022-01-14 00:02:37 +01:00
François Pottier
b757e8ece1
[make test]: test more random terms.
...
Test 180000 random terms, out of which 8385 well-typed terms.
[make test] requires about 12 seconds.
Remove the distinction between the fast and slow test suites.
2022-01-13 23:48:25 +01:00
François Pottier
51124aa2aa
Change [make test] to show how many terms and well-typed terms were tested.
2022-01-13 23:31:32 +01:00
François Pottier
6330ff6320
Avoid a space in the name "random suite".
2022-01-13 23:29:42 +01:00
François Pottier
718648d106
TODO.
2022-01-13 23:19:22 +01:00
François Pottier
2bb99de6d8
Hoist the call to [UnionFind.Make] outside of [Unifier.Make].
2022-01-13 22:31:08 +01:00
François Pottier
368e1694ab
TODO.
2022-01-12 14:39:04 +01:00
François Pottier
9c295cd04a
Done cleaning up Generalization.
2022-01-12 14:38:48 +01:00
François Pottier
e07baa195e
Generalization: thorough cleanup.
2022-01-12 01:05:21 +01:00
François Pottier
0138b3659d
Remove the [table] field.
2022-01-11 23:05:40 +01:00
François Pottier
f5aede8d77
Remove a complex and costly assertion.
...
This assertion now seems mostly redundant, since I have asserted
that downward propagation cannot hit a generic variable.
Admittedly this assertion is more eager (it checks all variables in existence)
whereas mine is more lazy (it checks the young variables only).
2022-01-11 23:05:40 +01:00
François Pottier
1e4fc7fa50
Assert that downward propagation can never hit a generic variable.
2022-01-11 23:05:40 +01:00
François Pottier
b6961fdaec
Some improvements in the constraint printer.
2022-01-11 23:05:40 +01:00
François Pottier
85e7194cae
More cleanup.
2022-01-11 23:05:40 +01:00
François Pottier
31ed6f4dec
Generalization: update more comments.
2022-01-11 18:34:40 +01:00
François Pottier
437a0e58ea
Clean up the first part of Generalization.
2022-01-11 18:27:33 +01:00