Sebastian Ullrich
81615fc856
refactor(library/init/lean/parser/module): replace coroutines with explicit snapshot state
2019-03-07 10:32:28 -08:00
Leonardo de Moura
0d4da4bc76
fix(library/init/lean/elaborator): borrow annotations
...
@kha I see you found this problem too :)
2019-03-07 10:26:40 -08:00
Leonardo de Moura
4e04d373e4
feat(library/init): unicode notation for heq: ≅
2019-03-07 10:21:14 -08:00
Leonardo de Moura
819d17ebbd
chore(library/init/lean/compiler/ir): use has_beq
2019-03-07 10:21:14 -08:00
Leonardo de Moura
79521e7e49
feat(library/init/core): add has_beq type class
2019-03-07 10:21:14 -08:00
Leonardo de Moura
67b01cddd0
chore(library/init): heq notation == ==> ~=
2019-03-07 10:21:14 -08:00
Leonardo de Moura
626d155c81
feat(library/init/lean/compiler/ir): alpha eqv for lean.ir.expr
2019-03-07 10:21:14 -08:00
Sebastian Ullrich
0e01871182
fix(library/init/lean/elaborator): re-add borrow annotations
2019-03-07 15:51:40 +01:00
Sebastian Ullrich
430fb81f69
fix(library/init/lean/parser/term,frontends/lean/builtin_exprs): @& should have higher rbp than ->
2019-03-07 14:35:25 +01:00
Sebastian Ullrich
a37dd02a41
perf(library/init/lean/frontend): do not hold on to outputs (syntax trees etc.) by default
2019-03-07 12:56:48 +01:00
Sebastian Ullrich
6f83faaee0
perf(library/init/lean/parser/command): index command parsers by first token
2019-03-07 11:28:42 +01:00
Leonardo de Moura
515556a718
feat(library/init/lean/compiler/ir): add new terminal: unreachable
2019-03-06 17:00:50 -08:00
Leonardo de Moura
d0c1c40cc1
feat(library/init/lean/compiler/ir): started alpha equivalence
...
I will continue this module later, after I fix a bug in the compiler
exposed by these new functions.
2019-03-06 12:32:30 -08:00
Leonardo de Moura
50476328ff
feat(library/init/lean/name): add name_map
2019-03-06 12:32:08 -08:00
Leonardo de Moura
6d7411cc07
perf(library/init/data/option/basic): missing [inline]
2019-03-06 10:58:12 -08:00
Sebastian Ullrich
1ad5450853
perf(library/init/control/coroutine): mark as [inline_as_reduce]
2019-03-06 17:30:20 +01:00
Sebastian Ullrich
ed4a0d904d
feat(library/init/lean/elaborator): make meta, remove max_commands
2019-03-06 16:26:21 +01:00
Leonardo de Moura
5e39a711fc
chore(init/lean/ir): remove old IR
2019-03-06 07:04:47 -08:00
Leonardo de Moura
6defbf82bd
feat(library/init/lean/compiler/ir): add meta data, fix names and declarations
...
cc @kha
2019-03-06 06:56:16 -08:00
Sebastian Ullrich
cfce916438
perf(library/init/lean/parser/module): make sure commands_aux is tail-recursive
2019-03-06 13:58:26 +01:00
Sebastian Ullrich
85bc52b9f2
feat(library/init/lean/frontend): profile frontend
2019-03-06 11:08:38 +01:00
Sebastian Ullrich
f2a161e5a9
feat(library/init/lean/util): Lean API for profiler
2019-03-06 10:37:38 +01:00
Leonardo de Moura
ed4cd39d59
feat(library/init/lean/compiler/ir): new IR for Lean
...
It is currently implemented in C++. The plan is to move the procedures
for inserting inc/dec, reset/reuse, and inferring borrow inferences to
Lean. Another goal is to make sure new IR optimizations can be
implemented in Lean, and to avoid backend optimizations that would
have to be duplicated in each backend (e.g., `emit_proj_inc_reset_seq`
at `emit_cpp.cpp`).
cc @kha
2019-03-04 16:46:10 -08:00
Leonardo de Moura
3f50df70bc
perf(library/init/lean/name): use hash code to speedup name.quick_lt
...
We use the same trick in the C++ version of this function.
I measured the impact using `lean --new-frontend core.lean` and checking
the number of instructions executed reported by Valgrind.
Before: 4,891,642,264
After: 4,847,313,330
2019-03-04 12:48:06 -08:00
Leonardo de Moura
20c877b277
chore(library/init/io): add inline
2019-02-22 09:55:36 -08:00
Leonardo de Moura
778e7e41f9
refactor(library/init/data/rbmap/basic): pass ins node-cell to balance1 and balance2.
...
The idea is to reuse the cell. The trick is like the one we used for
improving state_t. It seems to work pretty well. Now, the Lean
version is 29% slower than the C++ one.
cc @kha
2019-02-20 18:27:58 -08:00
Leonardo de Moura
835718955f
refactor(library/init/data/rbmap/basic): store color in the node
...
@kha Now the Lean version is approx. 50% slower than the C++ version.
2019-02-20 17:52:03 -08:00
Leonardo de Moura
7623f64b5e
feat(runtime,library/init/util): add some debugging helper function
2019-02-17 09:22:37 -08:00
Leonardo de Moura
170579c803
feat(library/init/core): task builting primitives
2019-02-17 08:45:46 -08:00
Leonardo de Moura
9e0b28d8ce
feat(library/init/data/array/basic): improve
2019-02-16 16:08:10 -08:00
Leonardo de Moura
3c73c43ab2
feat(runtime,library/init/data/array/basic): add builtin support for arrays
2019-02-16 15:27:23 -08:00
Leonardo de Moura
e84f7744c3
feat(library/init/lean/compiler/const_folding): const fold nat.succ and char.of_nat
2019-02-16 11:15:19 -08:00
Leonardo de Moura
c855094ecb
feat(library/init/data/char/basic): mark char.of_nat as noinline
2019-02-16 10:45:52 -08:00
Leonardo de Moura
61274c7d35
feat(library/init/data/char): use uint32 instead of nat for defining char
2019-02-15 18:07:55 -08:00
Leonardo de Moura
e0fd89e165
feat(library/init/lean/compiler): fold nat predicates
2019-02-15 16:17:16 -08:00
Leonardo de Moura
542bd432f8
test(tests/compiler): uint constant folding tests
2019-02-15 14:53:29 -08:00
Leonardo de Moura
0cb3ac683d
feat(library/compiler): connect new const_folding module implemented in Lean with csimp
2019-02-15 14:37:48 -08:00
Leonardo de Moura
6785ad9844
fix(library/init/lean/default): missing file
2019-02-14 15:21:53 -08:00
Leonardo de Moura
390c9009f7
chore(shell,boot): update boot, and initialization process
2019-02-14 14:49:16 -08:00
Leonardo de Moura
68e8aa8d1d
feat(library/init/lean/compiler): add constant folding helper functions
2019-02-14 14:35:10 -08:00
Leonardo de Moura
5e7308d22d
chore(library/init/lean/expr): get_app_fn
2019-02-14 14:12:25 -08:00
Sebastian Ullrich
587a7a001a
feat(library/init/lean/elaborator): to_pexpr: support string literals
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
dbc470d7e4
feat(library/init/lean/{parser/term,elaborator}): support @& borrowed annotations
2019-02-14 14:07:05 -08:00
Sebastian Ullrich
7cffe6935e
feat(frontends/lean/vm_elaborator): port to new runtime
2019-02-14 14:07:05 -08:00
Leonardo de Moura
b722885137
feat(library/init/io): add unsafe_io and timeit
2019-02-13 16:59:24 -08:00
Leonardo de Moura
9cb2005e8e
feat(library/init/lean): add hash functions and dbg_to_string
2019-02-13 16:19:25 -08:00
Leonardo de Moura
b89eb64cf1
refactor(library/init/lean/expr): use native constructors
2019-02-13 15:07:49 -08:00
Leonardo de Moura
e10240fe5c
refactor(runtime/io): use extern "C" for io primitives
2019-02-13 11:21:29 -08:00
Leonardo de Moura
71f5290567
feat(kernel): expose level primitives
2019-02-13 10:37:13 -08:00
Leonardo de Moura
4627929a83
refactor(boot,runtime,util): move name runtime implementation to util/name, and use "extern C" ABI
2019-02-13 08:27:23 -08:00