Leonardo de Moura
3f076fc836
perf: missing annotations and helper instances
2022-10-14 08:42:50 -07:00
Leonardo de Moura
8fe4b75c48
feat: do not inline definitions occurring in instances at the base phase
2022-10-12 16:24:16 -07:00
Leonardo de Moura
aa845dee98
feat: cache lambda lifted functions
2022-10-11 21:28:03 -07:00
Leonardo de Moura
f61ec4929f
chore: add low-level normExprCore
2022-10-09 12:10:11 -07:00
Leonardo de Moura
dc6f635f41
refactor: add LCNF/Internalize.lean
2022-10-03 09:18:11 -07:00
Leonardo de Moura
8cca2ea24e
fix: refresh LCNF parameter binder names
2022-09-29 12:46:53 -07:00
Leonardo de Moura
fd5f3a5bad
feat: track recursively inlining
...
closes #1657
see #1646
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/inline.20codegen.20crash/near/301099703
2022-09-27 16:26:49 -07:00
Leonardo de Moura
35ca2b203c
refactor: split Simp.lean
2022-09-26 07:04:20 -07:00
Mario Carneiro
85119ba9d1
chore: move Std.* data structures to Lean.*
2022-09-26 05:46:04 -07:00
Leonardo de Moura
ce12ecfe13
fix: free variable collision at LCNF/Specialize.lean
2022-09-24 18:51:32 -07:00
Leonardo de Moura
5969dc2694
feat: beta-reduce at LCNF normExpr
2022-09-24 18:26:34 -07:00
Leonardo de Moura
2be8cb93ac
feat: store phase at CompilerM context
2022-09-23 16:30:51 -07:00
Leonardo de Moura
5db452cfe7
doc: add note at LCNF internalizer
...
We should also new tests that expose the problem.
2022-09-22 20:19:01 -07:00
Leonardo de Moura
990b031871
feat: add translator attribute to MonadFVarSubst class
...
See new comments.
2022-09-20 16:58:27 -07:00
Leonardo de Moura
4c19fdbb97
fix: normFVarImp bug
2022-09-19 21:41:18 -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
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
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
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
e0197b4e09
feat: add bindCases
...
It is similar to `Code.bind` but has special support for `inlineMatcher`
2022-09-04 19:04:21 -07:00
Leonardo de Moura
bc88b0307e
feat: cases on cases for new LCNF simplifier
2022-09-03 07:54:19 -07:00
Leonardo de Moura
30c75b4b88
feat: add simpCasesOnCtor
2022-09-01 20:52:08 -07:00
Leonardo de Moura
255d34d2ac
feat: add simpValue? back
2022-09-01 20:52:08 -07:00
Leonardo de Moura
c201133d4d
feat: LCNF local context dead variable checker
...
This commit also fixes a few local declaration leaks.
2022-08-31 21:07:21 -07:00
Leonardo de Moura
ddab48a154
fix: erase dead variables
2022-08-31 20:43:13 -07:00
Leonardo de Moura
ba0835e387
feat: refresh binder names during internalization
2022-08-31 18:10:32 -07:00
Leonardo de Moura
25447af13c
feat: new code inliner
2022-08-31 18:10:32 -07:00
Leonardo de Moura
c451bf0c91
feat: add simpFunDecl
2022-08-30 11:45:05 -07:00
Leonardo de Moura
7b161d33d1
refactor: add MonadFVarSubst class
2022-08-29 09:52:16 -07:00
Leonardo de Moura
e80028b7d1
feat: add pure field to LetDecl, add helper functions for updating LCNF code
...
The update functions try to minimize the amount of memory allocation
2022-08-28 08:55:35 -07:00
Leonardo de Moura
d5fa178fc3
feat: modify FVarSubst used in the new code generator
2022-08-28 08:55:35 -07:00
Leonardo de Moura
cd0dd4cc2f
feat: start simp for new LCNF format
2022-08-27 19:59:31 -07:00
Leonardo de Moura
9446ae3056
feat: add cleanup function for CompilerM
2022-08-27 18:35:30 -07:00
Leonardo de Moura
11c8253f6c
feat: more update functions for LCNF
2022-08-27 10:41:54 -07:00
Leonardo de Moura
969dce70db
perf: improve FVarSubst apply functions in the new compiler stack
2022-08-26 20:10:36 -07:00
Leonardo de Moura
65f9344f01
feat: check whether join points are fully applied at Check.lean
2022-08-25 18:17:54 -07:00
Leonardo de Moura
4c9c2d2bf7
feat: new CSE.lean
2022-08-25 18:08:22 -07:00
Leonardo de Moura
3a2758a59b
refactor: new LCNF frontend
2022-08-24 11:40:37 -07:00
Leonardo de Moura
3e2f8c61ec
feat: helper LCNF functions
2022-08-23 19:37:33 -07:00
Leonardo de Moura
766afdd0bc
feat: store FunDecls at LCNF local context
2022-08-22 21:46:37 -07:00
Leonardo de Moura
a2fabc6d49
feat: inferType for new LCNF
2022-08-22 19:51:17 -07:00
Leonardo de Moura
b2c2d49bae
feat: new CompilerM for LCNF
2022-08-22 17:52:04 -07:00