Commit graph

4612 commits

Author SHA1 Message Date
Leonardo de Moura
e5846934e6 chore(tests/bench/rbmap500k): add new test 2019-09-11 18:01:56 -07:00
Leonardo de Moura
61a3ea61c4 perf(library/init/lean/compiler/ir/boxing): create auxiliary constants for caching the value of boxed/unboxed literals and constants
For example, in the new test `qsort64.lean`, the new optimization
prevents the repeated execution of `box UInt64.inhabited`.
On my machine
```
./run.sh qsort64.lean 2000000
```
Goes from 1.22s to 0.355s
2019-09-11 10:37:35 -07:00
Sebastian Ullrich
2110da4784 chore(tests/bench/speedcenter.exec.yaml): fix deriv speedcenter benchmark 2019-09-03 21:43:50 +02:00
Sebastian Ullrich
7b7f1d2cac test(tests/bench): add benchmarks as regular ctests with lowered inputs 2019-09-02 10:52:24 +02:00
Sebastian Ullrich
94b3de0130 chore(tests/bench): parameterize all benchmarks 2019-08-29 18:38:39 +02:00
Sebastian Ullrich
572926f5ce perf(shell/CMakeLists.txt, tests/): define NDEBUG in leanc release builds
`assert` is now being used by the C runtime
2019-08-27 16:54:29 +02:00
Leonardo de Moura
597562e5dd fix(tests/compiler/lazylist): extern cpp ==> extern c 2019-08-24 07:40:56 -07:00
Sebastian Ullrich
8cc2f731cd chore(tests/bench/speedcenter.exec.yaml): fix again 2019-08-16 22:24:22 +02:00
Sebastian Ullrich
f1db7e8041 chore(tests/bench/speedcenter.exec.yaml): add "rbmap_10" benchmark 2019-08-16 19:11:01 +02:00
Sebastian Ullrich
7c84f522be chore(tests/bench/speedcenter.exec.yaml): fix hilariously broken "stdlib size: lines" benchmark 2019-08-16 19:11:01 +02:00
Leonardo de Moura
9d37f53d83 fix(tests/lean/run/new_compiler): broken test 2019-08-16 09:46:44 -07:00
Sebastian Ullrich
a1a9daedce chore(tests/bench/report.py): go back to normalized tables 2019-08-15 14:24:23 +02:00
Leonardo de Moura
8e37fc512b fix(library/init/data/persistentarray/basic): bug at pop
fixes #28
2019-08-14 16:14:20 -07:00
Leonardo de Moura
4b49aa4b50 chore(tests/compiler): fix test 2019-08-13 15:27:44 -07:00
Leonardo de Moura
ae7167d626 fix(library/equations_compiler): equation compiler bug reported by @dselsam on Zulip
@kha @dselsam: I added a small repro for the bug reported by Daniel on
Zulip. The current fix is not polished at all since we will replace
the equation compiler with one implemented in Lean.  The bug is once
again on the code that handle nested `match`-expressions containing
recursive calls. We had problems in this module before, and the
current compilation strategy using auxiliary `*._match_<id>` functions
is also very inconvenient for users. They are often puzzled when they
see these auxiliary functions appearing in proof goals after unfolding
and/or simplification.  They usually don't know what to do with these
auxiliary definitions, and have no idea how they were defined and what
they correspond to if the function has several nested
`match`-expression. Right now, the best option is to use `#print
<fun-name>._match_<id>` which is far from ideal.

@kha: @dselsam and I discussed an alternative approach where we do not
create the auxiliary definitions, annotate the generated `cases_on`
applications with meta-data indicating they correspond to a nested
match, and modify the pretty printer to display these annotated
`cases_on` applications using the `match` syntax. With these
modifications, the behavior will be similar to the one in Coq where
complex `match`-expressions are reduced to atomic ones. The only
difference is that we represent these "atomic" `match`-expressions
using `cases_on` applications.
This commit uses a simpler version of this approach where we do not
create auxiliary `*._match_<id>` functions, and more importantly do
not use the dreadful `pull_nested_rec_fn` code.
2019-08-12 19:20:26 -07:00
Leonardo de Moura
7195244b04 feat(library/init/data/array/qsort): ensure qsort terminates even for bad lt relations 2019-08-10 22:10:14 -07:00
Sebastian Ullrich
5379636a94 chore(tests/bench): fix benchmarks 2019-08-10 12:52:42 +02:00
Leonardo de Moura
f8199bb540 fix(library/playground/patch): updateArgs => modifyArgs 2019-08-09 16:05:29 -07:00
Leonardo de Moura
92da659ec7 feat(library/init/data/persistenthashmap/basic): add PersistentHashMap.contains 2019-08-09 11:25:01 -07:00
Leonardo de Moura
d00019f57e chore(library/init): fix whitspaces before => 2019-08-09 09:13:49 -07:00
Leonardo de Moura
4d913370a7 chore(library/init): eliminate whitespaces using another patch script 2019-08-09 09:01:39 -07:00
Sebastian Ullrich
5b296cbb33 chore(tests/lean/ll_infer_type_bug): fix partial file manually 2019-08-09 11:11:34 +02:00
Sebastian Ullrich
3ed67138d5 chore(*): update equation syntax in files and old parser
for f in ../../**/*.lean; do echo $f; ./patch.lean.out $f > tmp && cat tmp > $f; done
2019-08-09 11:11:34 +02:00
Sebastian Ullrich
8f55517d8c chore(tests/lean/run/coroutine): abbreviate abbreviation 2019-08-09 11:11:34 +02:00
Sebastian Ullrich
934054b8d0 chore(tests/lean/trust0/basic): use nomatch 2019-08-09 11:11:34 +02:00
Leonardo de Moura
d889230211 chore(tests/compiler/termparsertest1): fix test 2019-08-08 21:02:23 -07:00
Leonardo de Moura
022a130b86 feat(tests/playground/patch): path equation syntax 2019-08-08 20:57:54 -07:00
Leonardo de Moura
849311af00 test(tests/playground/patch): do-nothing transformer 2019-08-08 10:47:19 -07:00
Leonardo de Moura
f1eaebba31 fix(library/compiler/csimp): bug at float_cases_on
The scope of the expr2ctor cache updates was incorrect.
This bug affects code of the form
```
let x := C.cases_on y ...; K[x]
```
when we try to float the `cases_on` application, and the continuation
`K[x]` contains another `cases_on` application with major `y`.
The new test exposes the bug.
This commit also fixes the case where the continuation `K[x]` projects `y`.

Fixes #26
2019-08-05 13:23:27 -07:00
Leonardo de Moura
bb8b13d240 chore(tests/compiler/expr): fix test output 2019-08-04 13:30:11 -07:00
Leonardo de Moura
4bd347de3a feat(library/init/data/persistentarray/basic): PersistentArray.pop 2019-08-04 11:50:05 -07:00
Leonardo de Moura
0f9da40d62 test(tests/compiler): PersistentHashMap tests 2019-08-02 14:23:13 -07:00
Leonardo de Moura
b146ed735a test(tests/compiler/phashmap): add PersistentHashMap test 2019-08-02 13:31:29 -07:00
Leonardo de Moura
3c5a30649d feat(library/init/data/persistenthashmap/basic): add PersistentHashMap.erase 2019-08-02 13:31:29 -07:00
Leonardo de Moura
c371b43970 feat(library/init/data): add PersistentHashMap 2019-08-02 13:31:29 -07:00
Sebastian Ullrich
b541bb9d4e chore(tests/compiler/binomial): lower input size
The previous inputs overflowed the stack using default stack limits with a debug build, and were a bit on the slow side
2019-08-02 10:25:54 +02:00
Leonardo de Moura
fe9908cad3 chore(tests/playground/persistentarray): fix test 2019-07-31 16:02:21 -07:00
Leonardo de Moura
8a4bc188c2 feat(library/init/data): add BinomialHeap 2019-07-31 15:13:00 -07:00
Leonardo de Moura
10fe453cf6 test(tests/lean/run/ubscalar): save UB scalar field test 2019-07-28 10:11:35 -07:00
Sebastian Ullrich
b902dc3dac fix(tests/lean/run/inline_fn): pretty-printer segfaults, disable for now 2019-07-26 12:39:35 -07:00
Leonardo de Moura
798bbc0662 feat(library/init/system/io): new primitives 2019-07-25 18:12:44 -07:00
Sebastian Ullrich
aef4a7159b chore(*): remove obsolete leanpkg.path files 2019-07-25 17:46:53 -07:00
Leonardo de Moura
b0d0cf973d chore(tests): fix tests 2019-07-25 17:44:25 -07:00
Leonardo de Moura
77a59f4998 feat(library/init/io): add IO.getEnv 2019-07-25 08:31:23 -07:00
Sebastian Ullrich
11ba44ed8a chore(tests/bench): fix syntax 2019-07-19 10:46:02 +02:00
Leonardo de Moura
b3e0a1d04e feat(library/init/lean/elaborator/basic): improve error handling, add simple test 2019-07-18 17:52:01 -07:00
Leonardo de Moura
79545f55c0 feat(library/init/io): add IO.readTextFile 2019-07-18 17:31:31 -07:00
Leonardo de Moura
40943f84f3 chore(tests): fix tests 2019-07-17 10:46:35 -07:00
Leonardo de Moura
310faa18c1 chore(tests/compiler/termparsertest1): fix test 2019-07-16 13:40:02 -07:00
Leonardo de Moura
f206b30fd7 feat(library/init/lean/parser): add charLit 2019-07-16 07:22:09 -07:00