Commit graph

432 commits

Author SHA1 Message Date
Leonardo de Moura
5fbe63cca4 fix: process remaining params 2022-09-18 15:29:41 -07:00
Leonardo de Moura
05145577fd feat: cache specialization results 2022-09-18 14:53:18 -07:00
Leonardo de Moura
796e9e3bdd feat: eta expand at specializeApp? 2022-09-18 13:21:55 -07:00
Leonardo de Moura
9dede6f632 feat: add mkSpecDecl 2022-09-17 17:30:57 -07:00
Leonardo de Moura
483234f30c refactor: rename Internalize.M 2022-09-17 16:46:44 -07:00
Leonardo de Moura
27c504107e feat: universe level parameter helper functions for the compiler 2022-09-17 16:29:44 -07:00
Leonardo de Moura
db6ee72aed chore: typo 2022-09-17 09:55:46 -07:00
Leonardo de Moura
3c6dee8048 fix: LCNF eta expansion bug at Simp.lean 2022-09-16 18:00:27 -07:00
Leonardo de Moura
abe1f7f6f9 feat: dependency collector for the code specializer 2022-09-15 19:55:37 -07:00
Mario Carneiro
6392c5b456 chore: import reductions 2022-09-15 14:02:38 -07:00
Leonardo de Moura
4f1f20bc97 refactor: ToExprM 2022-09-15 07:42:11 -07:00
Leonardo de Moura
c1b7accd12 refactor: LCNF local context
The previous implementation had a few issues:
- Function (and join point) declarations were being inserted into two different hashmaps.
- `borrow` information was not available for parameters.
- No proper erase functions.
2022-09-14 19:25:16 -07:00
Leonardo de Moura
9e5a818de5 fix: bug at LCNF toDecl 2022-09-14 15:23:34 -07:00
Leonardo de Moura
75f166edcc feat: add assertNoFun test 2022-09-14 13:59:09 -07:00
Leonardo de Moura
82bba1c63b feat: add Code.forM 2022-09-14 13:58:57 -07:00
Gabriel Ebner
f1b5fa53f0 chore: use new comment syntax 2022-09-14 08:26:17 -07:00
Leonardo de Moura
fccb60fb69 feat: support for [inlineIfReduce] at new compiler 2022-09-13 18:23:42 -07:00
Leonardo de Moura
e8246e026d fix: bug at compatibleTypes
Many thanks to @hargoniX
2022-09-13 15:58:06 -07:00
Leonardo de Moura
8f2ab82408 fix: bug at bindCases
Many thanks to @hargoniX
2022-09-13 15:36:46 -07:00
Leonardo de Moura
1350a57a03 refactor: remove pure field from LCNF.LetDecl
We decide that in phase 3 we will assume everything is impure, and
this kind of fine-grain tracking is not worth it.
2022-09-12 19:13:43 -07:00
Leonardo de Moura
b2d6caca0a fix: inferProjType at LCNF 2022-09-12 18:27:14 -07:00
Leonardo de Moura
506cf01d94 fix: bug at simpCasesOnCtor? 2022-09-12 16:02:19 -07:00
Leonardo de Moura
e08d48c591 feat: track ground let-declarations at Specialize.lean 2022-09-12 14:05:45 -07:00
Leonardo de Moura
ec2372e8d4 feat: add Specialize.lean skeleton 2022-09-11 20:19:44 -07:00
Leonardo de Moura
44c67f72c1 feat: add LCNF/SpecInfo.lean 2022-09-11 20:19:44 -07:00
Leonardo de Moura
54f1193739 chore: add maybeTypeFormerType 2022-09-11 20:19:44 -07:00
Leonardo de Moura
f0d75258ae feat: treat erased arguments as fixed arguments
It also renames `Lean.Expr.erased` => `Lean.Expr.isErased`
2022-09-11 20:19:44 -07:00
Leonardo de Moura
613523e1f6 feat: store borrow flag at Param
It is more robust that using `Expr.mdata`, and we save the information at `toLCNF`.
2022-09-11 20:19:44 -07:00
Leonardo de Moura
e78820e6a5 feat: add mkFixedArgMap 2022-09-11 20:19:44 -07:00
Henrik Böving
a03ea65d73 refactor: monadic compiler test framework style + new pass manager 2022-09-10 15:00:05 -07:00
Henrik Böving
c6db1099d0 feat: add occurences and phases to PassManager 2022-09-10 14:58:49 -07:00
Leonardo de Moura
ca098d3769 feat: inline applications of the form inline (f ...)
The `inline` identity function is a directive for the compiler.
2022-09-10 13:28:49 -07:00
Leonardo de Moura
1953f5953f chore: dangling file 2022-09-10 13:23:14 -07:00
Henrik Böving
5514339ffd fix: visit jp bodies in join point finder 2022-09-08 15:21:53 -07:00
Leonardo de Moura
a40118c79d chore: disable eager applyCasesOnImplementedBy
It must be performed at phase 2.
We still want to perform the regular `[implementedBy]` replacements at
phase 1 since they affect code specialization.
2022-09-08 14:50:27 -07:00
Leonardo de Moura
1c188b62cd chore: typo 2022-09-08 14:50:27 -07:00
Leonardo de Moura
5b969b75bd chore: fix build 2022-09-08 14:23:18 -07:00
Henrik Böving
f912349a29 fix: compiler test framework style 2022-09-08 14:09:14 -07:00
Henrik Böving
d2f7e724ac feat: findJoinPoints pass 2022-09-08 14:09:14 -07:00
Leonardo de Moura
26e304261f fix: PullFunDecls.lean
Use topological sort.
2022-09-07 22:41:05 -07:00
Leonardo de Moura
0a21603cdc feat: apply implementedBy replacements at second simp pass 2022-09-07 20:38:16 -07:00
Leonardo de Moura
07bdab45d2 feat: apply casesOn implementedBy replacements 2022-09-07 20:37:09 -07:00
Leonardo de Moura
ea3235c551 fix: skip casesOn recursors at code generation 2022-09-07 18:46:48 -07:00
Leonardo de Moura
19f5fe6f42 feat: add getSpecializationArgs? 2022-09-07 16:08:45 -07:00
Leonardo de Moura
55171a893a feat: elaborate specialization arguments 2022-09-07 15:22:56 -07:00
Leonardo de Moura
735dabdb3f refactor: use ParametricAttribute to implement [specialize] 2022-09-07 13:17:24 -07:00
Leonardo de Moura
661eb39bc8 feat: add inlinePartial config option 2022-09-06 20:46:17 -07:00
Leonardo de Moura
85851d0c43 fix: bug at PullFunDecls 2022-09-06 17:15:56 -07:00
Leonardo de Moura
56f0d6c183 feat: specialize partial applications of local functions 2022-09-06 06:44:33 -07:00
Leonardo de Moura
c769808a4e chore: add TODO 2022-09-05 19:35:17 -07:00