Commit graph

4640 commits

Author SHA1 Message Date
Leonardo de Moura
cc18c0ef91 feat(library/init/lean/expr): add Expr.hasFVar and Expr.hasMVar
cc @dselsam
2019-10-02 10:07:26 -07:00
Leonardo de Moura
a8b39346d3 chore(tests/bench): fix tests 2019-10-02 10:07:26 -07:00
Sebastian Ullrich
941aeb113a chore(tests/bench/speedcenter.yaml): update temci config 2019-10-02 14:14:49 +02:00
Sebastian Ullrich
cae1009175 fix(library/init/data/list/aux): rename to basic_aux.lean
`aux` is a reserved filename on Windows

/cc @leodemoura
2019-10-02 12:30:29 +02:00
Leonardo de Moura
fdab3b90b9 refactor(library/init/data/array): new name convention for Array functions 2019-10-01 16:46:05 -07:00
Leonardo de Moura
411f397654 refactor(library/init/data/list): new name convention for List functions
cc @dselsam @kha
2019-10-01 15:15:02 -07:00
Leonardo de Moura
a507145eb1 feat(library/init/lean/level): add instance : HasBeq Level 2019-10-01 09:47:44 -07:00
Leonardo de Moura
2b252a441e feat(library/init/lean/declaration): add ConstantInfo.instantiateTypeUnivParams and ConstantInfo.instantiateValueUnivParams
cc @dselsam

See new test for an example.
2019-09-30 15:46:19 -07:00
Leonardo de Moura
864b9c730c feat(library/init/lean/expr): helper functions
cc @dselsam

Notes:
- x.isAppOrConst => x.isApp || x.isConst
- x.isPi => x.isForall
2019-09-30 15:16:40 -07:00
Leonardo de Moura
faebe15a7f feat(library/init/lean/expr): add efficient instantiate1
cc: @dselsam
2019-09-30 14:33:32 -07:00
Sebastian Ullrich
522cf13449 chore(tests/bench): update GHC and ocaml 2019-09-25 14:09:22 +02:00
Sebastian Ullrich
4b4f5c9832 test(tests/bench): further updates 2019-09-25 11:03:14 +02:00
Sebastian Ullrich
d3aa6488da chore(tests/bench): update cross suite 2019-09-24 22:42:25 +02:00
Leonardo de Moura
1ecb234a9f test(elabissues): document some of the known problems 2019-09-21 10:17:26 -07:00
Leonardo de Moura
4db4b26de6 test(tests): use #eval and move tests 2019-09-19 14:38:52 -07:00
Leonardo de Moura
b147ebad67 chore(tests/lean/run/array1): remove #exit 2019-09-19 10:47:40 -07:00
Sebastian Ullrich
f22c17e94b chore(library/init/data/string/basic): remove broken lineColumn obsoleted by FileMap 2019-09-19 18:12:51 +02:00
Sebastian Ullrich
8cb387e599 chore(tests/lean/extract): reactivate some #eval tests 2019-09-19 18:12:51 +02:00
Leonardo de Moura
eebc722f57 feat(library/init/lean/expr): add abstractRange 2019-09-17 17:17:46 -07:00
Leonardo de Moura
75e5f5bfd8 feat(library/init/lean/expr): expose abstract 2019-09-16 18:34:45 -07:00
Leonardo de Moura
6d7041fcb4 test(tests/playground/inst): add instantiate and instantiateRev simple tests 2019-09-16 18:30:35 -07:00
Leonardo de Moura
bd7ee8b01b feat(library/init/lean/elaborator/term): add elabList, and fix elabTermAux 2019-09-14 08:41:49 -07:00
Leonardo de Moura
306ff7d7e5 fix(library/compiler): fixes #34
`csimp` assumes constructors and `casesOn` applications match.  That
is, given `I.casesOn x ...`, then if `x` is an constructor, then it is
a constructor of the inductive datatype `I`.
The transformation `erase_irrelevant` was violating this property when
it mixes `Decidable` and `Bool`. We fix this issue by mapping
`Decidable.casesOn`, `Decidable.isTrue` and `Decidable.isFalse` to
`Bool.casesOn`, `Bool.true` and `Bool.false` respectively.
2019-09-13 10:20:50 -07:00
Sebastian Ullrich
2227873dc6 chore(tests/compiler/binomial): further reduce input size for debug build of interpreter... 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
9f88c949f1 chore(tests/compiler): reduce some test sizes for the interpreter 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
3d53aaf5a7 chore(tests/compiler): ignore some tests for the interpreter 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
e5ef6eae1f chore(tests/playground/task_testX): update syntax 2019-09-12 18:26:15 +02:00
Sebastian Ullrich
d5737d0713 test(shell/CMakeLists.txt): add compiler tests as interpreter tests 2019-09-12 18:22:02 +02:00
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