Leonardo de Moura
2db7cd158b
feat(library/init/lean/compiler/ir): export primitives to C++
...
Remark: we don't need to expose all of them since the C++ code only
generates code in the Lambda_pure fragment.
2019-04-29 17:10:42 -07:00
Leonardo de Moura
c09df2d8c3
feat(library/init/lean/compiler/ir): use Array instead of List
...
The idea is to use the same approach we have used at `tests/playground/parser/syntax.lean`
2019-04-29 10:48:33 -07:00
Leonardo de Moura
807c9bff6d
refactor(library/init): HasToFormat ==> HasFormat, toFormat ==> format
2019-04-28 09:16:47 -07:00
Leonardo de Moura
13d2398fb3
feat(library/init/lean/compiler/ir): formatter
2019-04-27 17:55:27 -07:00
Leonardo de Moura
07a68375f5
chore(library/init/lean/compiler/ir): style
2019-04-26 09:15:37 -07:00
Leonardo de Moura
abaf181495
refactor(core): homogeneous andthen
...
The motivation is to make sure `andthen` and `orelse` are both
homogeneous.
2019-04-24 14:00:34 -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
c2e474f216
chore(library/init/lean/compiler): cleanup notation
2019-04-04 15:26:09 -07:00
Leonardo de Moura
5f6106be83
chore(init): add reserve for all control notation at core.lean
...
cc @kha
2019-04-04 08:53:42 -07:00
Leonardo de Moura
b66f5dcf5c
chore(library/init): avoid wf_term_hack
2019-03-27 12:12:21 -07:00
Leonardo de Moura
681f3ec81b
fix(library/compiler/llnf): constructor reuse
...
We were not reusing constructor values for constructors that contained only
scalar values.
2019-03-26 11:10:51 -07:00
Leonardo de Moura
2a37e60ba9
feat(library/init/core): add != notation
2019-03-25 16:58:01 -07:00
Leonardo de Moura
87cab24a1d
fix(library/compiler/csimp): at_most_once at elim_jp1_fn
...
`elim_jp1_fn` was incorrectly expanding join points that were used more
than once. The issue is that the `foreach` combinator "may" skip nodes
that have already been visited.
2019-03-25 14:19:11 -07:00
Leonardo de Moura
7f58843d48
feat(library/init/lean/compiler/util): atMostOnce visitor
2019-03-25 14:19:10 -07:00
Leonardo de Moura
1c671965c5
feat(library/init/lean/options): add registerOption
2019-03-22 17:26:43 -07:00
Leonardo de Moura
dc73d5443d
refactor(library/init/lean): add MData abbreviation
2019-03-22 17:26:43 -07:00
Leonardo de Moura
e1ea2b3948
chore(library/init): fix names and add HasEmptyc instances
2019-03-22 12:38:22 -07:00
Leonardo de Moura
e24ad8c0b5
feat(library/init/core): add HasBeq default instances for types that implement DecidableEq
...
@kha I think code looks less weird if we don't mix Booleans and
propositions in the same expression.
2019-03-22 11:23:45 -07:00
Leonardo de Moura
11688fd813
fix(library/init/lean): [export...]
2019-03-21 15:06:44 -07:00
Leonardo de Moura
430bbef6d7
chore(*): minor
2019-03-21 15:06:44 -07:00
Leonardo de Moura
1fe3f14ad0
chore(*): Uint => UInt, Usize => USize
2019-03-21 15:06:44 -07:00
Leonardo de Moura
2be87ecd92
chore(library/init): Bool.tt => Bool.true and Bool.ff => Bool.false
2019-03-21 15:06:44 -07:00
Leonardo de Moura
62e6341014
chore(*): lowercase file names
2019-03-21 15:06:44 -07:00
Leonardo de Moura
04e20623e6
chore(*): use lowercase dir names
2019-03-21 15:06:44 -07:00
Leonardo de Moura
67fb78bb47
chore(*): renaming files
2019-03-21 15:06:44 -07:00
Sebastian Ullrich
beda5f5f43
chore(library): capitalize types and namespaces
2019-03-21 15:06:43 -07:00
Sebastian Ullrich
b939162168
chore(library): switch from snake_case to camelCase
2019-03-21 15:06:43 -07:00
Leonardo de Moura
ecdb9d6df0
feat(library/init, frontends/lean): add abbreviation for abbreviation
2019-03-15 16:01:25 -07:00
Leonardo de Moura
baec9a1b78
chore(library/init/lean/compiler/ir): minor
2019-03-08 09:14:54 -08:00
Leonardo de Moura
db6f08e66d
feat(library/init/lean/compiler/ir): collect fnbody free variables
2019-03-07 15:37:45 -08:00
Leonardo de Moura
27028309a3
feat(library/init/lean/kvmap): add == for kvmap
2019-03-07 14:12:10 -08:00
Leonardo de Moura
a836bcc204
feat(library/init/lean/compiler/ir): alpha equivalence
2019-03-07 13:50:35 -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
626d155c81
feat(library/init/lean/compiler/ir): alpha eqv for lean.ir.expr
2019-03-07 10:21:14 -08: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
6defbf82bd
feat(library/init/lean/compiler/ir): add meta data, fix names and declarations
...
cc @kha
2019-03-06 06:56:16 -08: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
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
e0fd89e165
feat(library/init/lean/compiler): fold nat predicates
2019-02-15 16:17:16 -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
68e8aa8d1d
feat(library/init/lean/compiler): add constant folding helper functions
2019-02-14 14:35:10 -08:00