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
d588d39786
fix(library/init/lean/parser): use symbolOrIdent when parsing max and imax
2019-07-14 08:22:07 -07:00
Leonardo de Moura
2f60132610
test(tests/compiler/termparsertest1): new test
2019-07-11 13:16:25 -07:00
Leonardo de Moura
c00788a982
fix(library/init/lean/compiler/ir/emitcpp): header of big boxed functions
2019-07-08 21:52:01 -07:00
Leonardo de Moura
a02443d23d
chore(frontends/lean): fun x, e ==> fun x => e
2019-07-02 13:22:11 -07:00
Sebastian Ullrich
c299e6c0e6
chore(tests): fix do syntax in tests
2019-06-30 13:04:34 +02:00
Leonardo de Moura
1658be20f1
feat(library/init/data/string): add String.isPrefixOf
2019-06-06 14:20:50 -07:00
Leonardo de Moura
ffbccf1ee9
fix(library/compiler): ByteArray bug
2019-06-03 15:01:16 -07:00
Leonardo de Moura
0f43c2e2d9
feat(library/init/data/array/basic): efficient heterogeneous Array.map
...
This commit also removes Array.hmap.
Motivation: I wanted to use Array.hmap as an example in the paper, but
I found it would be too distracting to explain why we had `Array.hmap`
and `Array.map`.
cc @kha
2019-05-25 16:32:59 -07:00
Leonardo de Moura
99d2f9931d
fix(library/init/lean/compiler/ir/resetreuse): typo
2019-05-22 08:45:29 -07:00
Leonardo de Moura
4d2837430a
fix(library/compiler/emit_cpp): tail call
...
Add temporary hack to fix `emit_tail_call`.
TODO: find a cleaner solution for the new IR compiler.
2019-05-21 23:07:10 -07:00
Leonardo de Moura
c57731f8c6
chore(tests/compiler/rbmap): fix test
2019-05-13 12:30:01 -07:00
Leonardo de Moura
ac747c5f6e
feat(library/init/data/rbmap): add erase
2019-05-04 15:58:30 -07:00
Leonardo de Moura
970941db2c
feat(library/init/data/array/basic): add Array.filter
2019-05-02 09:51:08 -07:00
Leonardo de Moura
1707628b6b
feat(library/init/data/array/basic): Array.reverse
2019-05-01 17:38:44 -07:00
Leonardo de Moura
df84868ab4
feat(library/init/data/array/basic): array helper functions
2019-04-28 10:10:24 -07:00
Leonardo de Moura
9c81cd7f1d
feat(library/init/data/array/basic): add Array.extract
2019-04-07 13:08:23 -07:00
Leonardo de Moura
4d3689ea33
feat(library/init/data/array/basic): add new array functions
...
@kha I renamed the homogeneous `map` to `hmap`, and added the
heterogeneous one as `map`. As soon as we add user-defined rewriting
rules, we will be able to replace `map` with `hmap` whenever the types
are the same.
2019-04-06 19:25:32 -07:00
Leonardo de Moura
d603baea70
test(tests/compiler): add new test
2019-04-05 16:58:47 -07:00
Leonardo de Moura
1bb920322d
feat(library/init/lean/compiler/constfolding): constant folding for strictAnd and strictOr
2019-04-05 16:51:29 -07:00
Leonardo de Moura
018ff249b9
test(tests/compiler/lazylist): new test for closures and thunks
2019-03-29 15:00:52 -07:00
Leonardo de Moura
4149a25186
chore(tests): fix tests
2019-03-29 11:25:26 -07:00
Leonardo de Moura
e71249f6b3
chore(tests): fix tests
2019-03-27 14:06:23 -07:00
Leonardo de Moura
9a071c18e7
feat(library/equations_compiler): add support for partial definitions
2019-03-27 11:09:32 -07:00
Leonardo de Moura
3b70e8785b
chore(tests/compiler/str): fix test
2019-03-22 17:26:43 -07:00
Leonardo de Moura
3befc219c9
chore(library/init): Empty => empty when it is a function
2019-03-21 17:03:15 -07:00
Sebastian Ullrich
f34d37c371
chore(tests): port tests, fix at least compiler tests
2019-03-21 15:11:05 -07:00
Sebastian Ullrich
f160fd8de0
chore(tests): compile tests using -O3 again
2019-03-18 17:55:28 +01:00
Sebastian Ullrich
f6d3062524
feat(bin/leanc): add simple C++ compiler wrapper script
2019-03-18 16:11:30 +01:00
Leonardo de Moura
b1c187f717
feat(library/compiler): allow io unit as main function result type
...
When `io unit` is used, we use `return 0` for `result.ok`, and `return
1` for `result.except`.
2019-03-16 16:05:45 -07:00
Leonardo de Moura
6d0ec3a8c9
refactor(library/init/io): implement io monad using estate monad
2019-03-16 15:34:58 -07:00
Leonardo de Moura
cf3bbd7e25
feat(runtime): add utf8_prev and utf8_set
...
Next goal: implement string.iterator in Lean
2019-03-11 18:05:40 -07:00
Leonardo de Moura
01b4983fa2
fix(runtime/object): string_utf8_extract
2019-03-09 12:57:51 -08:00
Leonardo de Moura
67944a6c81
test(tests/compiler/str): new test for utf8 primitives
2019-03-09 12:41:33 -08:00
Leonardo de Moura
7b1d15ec43
fix(library/compiler/specialize): avoid work duplication in the specializer
2019-03-08 11:21:49 -08:00
Leonardo de Moura
dfce086c9e
test(tests/compiler/array_test): basic array test
2019-02-16 16:08:49 -08:00
Leonardo de Moura
542bd432f8
test(tests/compiler): uint constant folding tests
2019-02-15 14:53:29 -08:00
Sebastian Ullrich
03456ab752
chore(tests/compiler/t2): fix test
2019-02-15 12:13:45 -08:00
Sebastian Ullrich
b8900fad80
chore(tests/compiler/test.sh): rename to conventional test_single.sh so that (lean4-diff-test-file) works
2019-02-15 12:13:45 -08:00
Leonardo de Moura
b6d1506434
fix(tests/compiler/t2): pause at the end
...
@kha I figured out why we had a long pause in the end of this benchmark
when using `11` instead of `9`. The function `deriv` was computing
`d := d "x" f` (the expensive computation), printing the size of `f` and
returning `d`. So, in the last step we were quickly printing the size
of the input 40230090 (when using `nest deriv 11 f`), and then computing
`d := d "x" f` which returns an object of size 374429936 which is never
used for anything.
That is, the pause had nothing to do with memory deallocation. I found
this issue after I implemented the deferred free feature which did not
fix the pause :)
2019-02-14 10:44:59 -08:00
Leonardo de Moura
19e111c2ff
feat(library/compiler): allow main function to also have type io uint32
2019-02-13 16:29:10 -08:00
Leonardo de Moura
06bb9b7ea8
test(tests/compiler): add simple test for expr
2019-02-13 16:22:01 -08:00
Sebastian Ullrich
67f8f7a2da
chore(tests/compiler/append): add expected output
2019-02-09 20:02:26 +01:00
Leonardo de Moura
6cb96331b1
chore(tests/compiler): add .gitignore
2019-02-08 16:59:17 -08:00
Leonardo de Moura
5dcbb9c50d
test(tests/compiler/append): append test
2019-02-08 16:52:41 -08:00
Leonardo de Moura
01119b529f
test(tests/compiler): add thunk test
...
This test will take a long time if `thunk` result is not cached.
2019-02-08 11:01:33 -08:00
Leonardo de Moura
e2ee2d4bd9
chore(tests/compiler): add deriv test
2019-02-07 16:56:40 -08:00
Leonardo de Moura
259941c184
chore(tests/compiler/test_flags): include release flags
...
@kha The `-O3` option is not at CMAKE_CXX_FLAGS, but in build mode
specific configuration. I added this hack because I want to include
performance tests too. Perhaps, I should move performance tests to a
different directory.
2019-02-07 16:30:30 -08:00
Leonardo de Moura
109d569310
feat(tests/compiler): add first test
2019-02-07 12:14:25 -08:00