Commit graph

16407 commits

Author SHA1 Message Date
Leonardo de Moura
a4e135790b feat(library/init/lean/compiler/ir/normids): add Decl.uniqueIds predicate 2019-05-08 14:17:17 -07:00
Sebastian Ullrich
8e8b7757e2 fix(library/Makefile): recreate libleanstdlib.a from scratch to avoid conflicts when moving files 2019-05-08 18:13:17 +02:00
Leonardo de Moura
0de9a92d4c feat(library/init/lean/compiler/ir/boxing): missing case 2019-05-08 06:04:18 -07:00
Leonardo de Moura
74fb8e627a feat(library/init/lean/compiler/ir/checker): improve IR checker 2019-05-08 05:47:25 -07:00
Leonardo de Moura
a24a8361f5 feat(library/init/lean/compiler/ir/boxing): add some missing cases 2019-05-07 18:23:08 -07:00
Leonardo de Moura
305f376a76 fix(stage0): missing files 2019-05-07 16:22:45 -07:00
Leonardo de Moura
6d4f7527a2 feat(library/init/lean/compiler/ir/boxing): explicit boxing and unboxing instructions
TODO: FnBody.vdecl case
2019-05-07 16:21:29 -07:00
Leonardo de Moura
2cea92b4c8 fix(library/init/lean/compiler/ir/resetreuse): do not use reset and reuse for 0-ary constructors 2019-05-07 16:13:35 -07:00
Leonardo de Moura
800569af5f chore(library/init/lean/compiler/ir/basic): cleanup 2019-05-07 16:13:22 -07:00
Leonardo de Moura
b717177a1a chore(library/init/data/array/basic): make sure Array.*foldl and List.*foldl have similar signatures 2019-05-07 15:23:03 -07:00
Leonardo de Moura
b782191d0b chore(tests/lean/run/float_cases_bug): fix test 2019-05-07 15:22:01 -07:00
Leonardo de Moura
b41d7ec98b chore(library/compiler/ir): style 2019-05-07 15:20:56 -07:00
Leonardo de Moura
5d3c6dbac2 feat(library/init/lean/compiler/ir/basic): add IRType.isScalar 2019-05-07 15:06:55 -07:00
Leonardo de Moura
4e5121fb5b chore(library/init/data/array/basic): more general miterate2 mfold2 iterate2 fold2 2019-05-07 15:06:11 -07:00
Leonardo de Moura
37c60da70d refactor(library/init/lean/compiler/ir): cleanup Context 2019-05-07 14:41:08 -07:00
Leonardo de Moura
5b9936f38d chore(library/init/lean/compiler/ir/resetreuse): add namespace ResetReuse 2019-05-07 12:31:32 -07:00
Leonardo de Moura
2363fdf544 refactor(library/init/lean/compiler/ir): remove redundant field from FnBody.jdecl
The result type of a join point is always equal to the function return
type. Moreover, the extra bookkeeping introduces extra work, and doesn't
really help.
2019-05-07 12:26:11 -07:00
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
bca57afae7 fix(library/init/io): RefPointed must "depend" on \alpha 2019-05-07 09:26:28 -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
4b4ff9bf69 feat(library/init/data/array/basic): add Array.mfor 2019-05-06 18:21:29 -07:00
Leonardo de Moura
20285b1079 fix(library/init/core): incorrectly fixing universe level at 1 2019-05-06 18:20:39 -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
fa16920a6a feat(library/init/control/conditional): add HasToBool.toBool, and combinators
New combinator: `bool`, `<&&>` and `<||>`
2019-05-06 14:24:20 -07:00
Leonardo de Moura
0d1a0c8b6e chore(library): toBool ==> decide
We want to define a type class similar to Haskell's `ToBool`.
2019-05-06 14:02:15 -07:00
Leonardo de Moura
c1fecc8939 feat(library/init/data/array/basic): add anyM and allM 2019-05-06 13:47:36 -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
Sebastian Ullrich
51fe185989 chore(script/prepare-commit-msg): fix shebang 2019-05-05 23:24:24 +02:00
Sebastian Ullrich
a3935aedcd chore(CMakeLists): fix install 2019-05-05 23:24:24 +02: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
ac747c5f6e feat(library/init/data/rbmap): add erase 2019-05-04 15:58:30 -07:00
Leonardo de Moura
8db0474571 feat(library/init/data/random): random numbers
It is useful for creating tests.
2019-05-04 15:57:42 -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
626e8fb27f chore(library/init/data/rbmap/basic): use [specialize] instead of [inline]
`RBMap.insert` is not that small.
2019-05-03 21:09:49 -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
04670c4127 fix(library/compiler/struct_cases_on): bug and missing case 2019-05-03 20:03:03 -07:00
Leonardo de Moura
6f971382be chore(stage0): update 2019-05-03 19:01:17 -07:00
Leonardo de Moura
82d88dc96f chore(library/init/core): make sure new frontend can parse it
@kha This is a temporary fix. We will get back to the new frontend after
we submit the IR paper.
2019-05-03 17:36:39 -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
cae5ee075e test(tests/playground/badreset): add test that exposes a bad reset/reuse placement
The generated code is safe, but the `reset/reuse` optimization will
never be applicable at runtime. The issue is that
`insert_reset_reuse_fn` is not checking the joint points.
I will fix the bug only at `resetreuse.lean`.
2019-05-03 17:13:29 -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
Sebastian Ullrich
1aef9ac576 feat(frontends/lean/match_expr): terminate match on dedent between equations 2019-05-03 13:46:10 +02:00