Leonardo de Moura
fd25827d3e
fix(library/init/lean/compiler/ir/resetreuse): must use livevars instead of freevars
...
The file badreset contains two functions where the new `reset/reuse`
insertion procedure implemented in Lean produces better results than the
one implemented in C++.
cc @kha
2019-05-07 11:09:51 -07:00
Leonardo de Moura
6a496844fd
chore(library/init/lean/compiler/ir/freevars): simplify code using "no shadowing" assumption
2019-05-06 18:38:03 -07:00
Leonardo de Moura
1295bf52bc
feat(library/init/lean/compiler/ir): add Decl.checker for debugging purposes
...
We have also added a new `Context` object, and modified our IR
invariant. Now, we assume there is no variable or join point shadowing.
2019-05-06 18:35:06 -07:00
Leonardo de Moura
05a2e88ac9
feat(library/init/lean/compiler/ir): add FnBody.isLiveVar
2019-05-06 16:13:47 -07:00
Leonardo de Moura
604d5fecbb
feat(library/init/lean/compiler/ir/basic): add Context
2019-05-06 10:57:45 -07:00
Leonardo de Moura
67d9f4cd1e
chore(library/init/lean/compiler/ir): clarify
2019-05-06 10:52:33 -07:00
Leonardo de Moura
439ce06a19
refactor(library/init/lean/compiler/ir): move "free variable" code to separate file
2019-05-05 08:04:33 -07:00
Leonardo de Moura
7a5e64e52e
chore(library/init/lean/compiler): move IR related files to subdirectory
2019-05-05 07:55:36 -07:00
Leonardo de Moura
54fc37b00d
feat(library/init/lean/compiler): add Decl.normalizeIds
2019-05-03 22:46:56 -07:00
Leonardo de Moura
b6c4caf725
feat(library/init/lean/compiler/simpcase): do not create default case when there are no repeated branches
...
It reduces clarity without improving performance.
2019-05-03 20:48:52 -07:00
Leonardo de Moura
86faa5ade4
chore(library/init/lean/compiler/ir): modify join point formatter
2019-05-03 17:22:02 -07:00
Leonardo de Moura
80e9c4706f
fix(library/init/lean/compiler/resetreuse): bug during cleanup
2019-05-03 17:00:20 -07:00
Leonardo de Moura
4845a2dbc4
feat(library/init/lean/compiler): cleanup
2019-05-03 16:37:08 -07:00
Leonardo de Moura
c34b064e83
feat(library/init/lean/compiler/ir): add insertResetReuse
2019-05-03 14:20:14 -07:00
Leonardo de Moura
1e101d35a8
feat(library/init/lean/compiler/ir): add auxiliary functions
2019-05-03 12:19:58 -07:00
Leonardo de Moura
4cafd19f72
chore(library/init/lean/compiler): missing prelude
2019-05-03 12:19:58 -07:00
Sebastian Ullrich
c77970a00f
refactor(library): remove now-redundant parentheses
2019-05-03 13:57:21 +02:00
Leonardo de Moura
fb8bbee609
chore(library/init/lean/compiler/pushproj): cleanup
2019-05-02 15:45:56 -07:00
Leonardo de Moura
02da0177bb
feat(library/init/lean/compiler/ir): add updtHeader field
...
This field is not used in the paper, but we have used in the C++
implementation and got a significant performance boost.
2019-05-02 15:29:42 -07:00
Leonardo de Moura
805ee81e73
chore(library/init/lean/compiler): modifiedJPVals ==> modifyJPs
2019-05-02 15:22:33 -07:00
Leonardo de Moura
2c4811a808
chore(library/init/lean/compiler): remove unnecessary [@export]s
2019-05-02 15:04:28 -07:00
Leonardo de Moura
e3f32a6108
chore(library/init/lean/compiler): cleanup
2019-05-02 15:02:35 -07:00
Leonardo de Moura
e90224b435
fix(library/init/lean/compiler/simpcase): bugs at simpCase
2019-05-02 15:02:21 -07:00
Leonardo de Moura
76a49ec256
chore(library/compiler): add ir::test
2019-05-02 14:40:04 -07:00
Leonardo de Moura
3628b39cb6
feat(library/init/lean/compiler): add simpcase transformation
2019-05-02 12:40:37 -07:00
Leonardo de Moura
db30a23055
fix(library/init/lean/compiler): bug fixes
2019-05-02 12:22:00 -07:00
Leonardo de Moura
46c3a14f83
chore(library/init/lean/compiler/pushproj): move comment
2019-05-02 09:48:17 -07:00
Leonardo de Moura
719eb67114
chore(library/init/lean/compiler): VarIdxSet => IndexSet
2019-05-02 08:23:59 -07:00
Leonardo de Moura
3a612bfd8b
feat(library/init/lean/compiler): add elimDead transformation
2019-05-02 08:06:45 -07:00
Leonardo de Moura
5a83a2d7bb
feat(library/init/data/array/basic): add swapAt
2019-05-02 07:46:11 -07:00
Leonardo de Moura
94fe3c18d0
fix(library/init/data/rbtree/basic): add HasInsert instance
...
It is useful for defining finite trees
2019-05-01 21:19:07 -07:00
Leonardo de Moura
e52e787ad5
fix(library/init/lean/compiler/pushproj): bug and cleanup
2019-05-01 21:01:03 -07:00
Leonardo de Moura
2991b966e5
featg(library/init/lean/compiler): add pushproj
2019-05-01 17:38:44 -07:00
Leonardo de Moura
cfec797e69
feat(library/init/lean/compiler/ir): helper functions
2019-05-01 17:38:44 -07:00
Leonardo de Moura
ed5e461130
feat(library/init/lean/compiler/ir): add maxVar
2019-05-01 17:38:44 -07:00
Leonardo de Moura
2614b95a8b
refactor(library/init/lean/compiler/ir): use Nat instead of Name for local vars
2019-05-01 17:38:44 -07:00
Leonardo de Moura
0c9fa13763
feat(library/init/lean/compiler): convert LLNF into Lean IR
2019-04-30 17:55:43 -07:00
Leonardo de Moura
952eb0f515
feat(library/compiler): C++ API for Lean IR
2019-04-29 18:23:19 -07:00
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