Commit graph

17210 commits

Author SHA1 Message Date
Leonardo de Moura
f1eaebba31 fix(library/compiler/csimp): bug at float_cases_on
The scope of the expr2ctor cache updates was incorrect.
This bug affects code of the form
```
let x := C.cases_on y ...; K[x]
```
when we try to float the `cases_on` application, and the continuation
`K[x]` contains another `cases_on` application with major `y`.
The new test exposes the bug.
This commit also fixes the case where the continuation `K[x]` projects `y`.

Fixes #26
2019-08-05 13:23:27 -07:00
Leonardo de Moura
99e90f0410 chore(library/compiler): add trace.compiler.simp_float_cases option 2019-08-05 13:13:18 -07:00
Leonardo de Moura
fb5fb03f00 feat(library/init/lean/localcontext): add isSubPrefixOf 2019-08-05 09:44:20 -07:00
Leonardo de Moura
215a3ac8fd chore(library/tactic/clear_tactic): remove dead code 2019-08-05 08:58:59 -07:00
Leonardo de Moura
3ecf8ac8ec feat(library/init/data/persistentarray/basic): add mfoldlFrom and foldlFrom 2019-08-05 07:41:41 -07:00
Leonardo de Moura
bb8b13d240 chore(tests/compiler/expr): fix test output 2019-08-04 13:30:11 -07:00
Leonardo de Moura
1b426db5d9 chore(stage0): update 2019-08-04 13:25:25 -07:00
Leonardo de Moura
34024256ab chore(library/init/lean/expr): simplify Expr.mvar constructor 2019-08-04 13:24:27 -07:00
Leonardo de Moura
142063fee4 feat(library/init/lean/localcontext): add getUnusedName 2019-08-04 13:14:22 -07:00
Leonardo de Moura
2a914d99dd feat(library/init/lean/localcontext): missing functions 2019-08-04 13:01:01 -07:00
Leonardo de Moura
af46e36266 fix(library/init/data/persistentarray/basic): universes 2019-08-04 13:00:32 -07:00
Leonardo de Moura
2a58e58480 feat(library/init/data/persistentarray/basic): add mfind and mfindRev 2019-08-04 12:30:12 -07:00
Leonardo de Moura
c1e36fbaec feat(library/init/lean/localcontext): add erase and pop 2019-08-04 11:58:53 -07:00
Leonardo de Moura
4bd347de3a feat(library/init/data/persistentarray/basic): PersistentArray.pop 2019-08-04 11:50:05 -07:00
Leonardo de Moura
4181f35546 chore(stage0): update 2019-08-04 09:30:52 -07:00
Leonardo de Moura
f55a00a022 feat(library/init/lean): add LocalContext 2019-08-04 09:29:05 -07:00
Leonardo de Moura
8a8b45b6e0 chore(stage0): update 2019-08-04 08:41:19 -07:00
Leonardo de Moura
c5abab8fd2 fix(library/init/lean/path): <dir>/<mod>.lean must have precedence over <dir>/<mod>/default.lean 2019-08-04 08:38:48 -07:00
Leonardo de Moura
1ef23950a4 chore(library/init/lean/expr): expose temporary legacy constructor 2019-08-04 08:03:09 -07:00
Leonardo de Moura
41d8cd9eb9 chore(kernel/expr): remove depth and weight fields
These fields were rarely used, but they were used in the hash code
calculation. So, we may see a negative performance impact.
There is also a positive performance impact since `Expr` consumes less
memory, and it is faster to allocate them.
2019-08-03 11:05:01 -07:00
Leonardo de Moura
7f142ac7e3 chore(kernel/expr): hide get_weight and get_depth 2019-08-03 10:57:30 -07:00
Leonardo de Moura
d2f169a211 chore(library/init/lean/parser/parser): remove unnecessary unsafe code 2019-08-02 14:32:47 -07:00
Leonardo de Moura
1be9ee97be chore(stage0): update 2019-08-02 14:26:22 -07:00
Leonardo de Moura
0f9da40d62 test(tests/compiler): PersistentHashMap tests 2019-08-02 14:23:13 -07:00
Leonardo de Moura
84c4637722 fix(library/init/data/array/basic): fix and rename eraseIdxSz ==> eraseIdx' 2019-08-02 14:06:35 -07:00
Leonardo de Moura
0a86911bd0 fix(library/init/data/persistenthashmap/basic): isUnaryNode 2019-08-02 13:59:31 -07:00
Leonardo de Moura
b146ed735a test(tests/compiler/phashmap): add PersistentHashMap test 2019-08-02 13:31:29 -07:00
Leonardo de Moura
3c5a30649d feat(library/init/data/persistenthashmap/basic): add PersistentHashMap.erase 2019-08-02 13:31:29 -07:00
Leonardo de Moura
69bca3ad42 feat(library/init/data/array/basic): add version of Array.indexOf with property about resulting size 2019-08-02 13:31:29 -07:00
Leonardo de Moura
19e341cfcc feat(library/init/data/array/basic): add Array.indexOf and Array.eraseIdx 2019-08-02 13:31:29 -07:00
Leonardo de Moura
c371b43970 feat(library/init/data): add PersistentHashMap 2019-08-02 13:31:29 -07:00
Sebastian Ullrich
25d8c76910 chore(azure-pipelines.yml): retry Nix install, move package setup to Setup phase
/cc @leodemoura @joehendrix
2019-08-02 11:15:44 +02:00
Sebastian Ullrich
b541bb9d4e chore(tests/compiler/binomial): lower input size
The previous inputs overflowed the stack using default stack limits with a debug build, and were a bit on the slow side
2019-08-02 10:25:54 +02:00
Sebastian Ullrich
3b96b31b66 chore(azure-pipelines.yml): debug, LLVM, sanitized builds 2019-08-02 10:25:54 +02:00
Sebastian Ullrich
2abfd7d90b chore(shell.nix): use clang 7 by default (latest release in stable Nix) 2019-08-02 10:17:29 +02:00
Leonardo de Moura
9e53db95ba chore(CMakeLists): set default to OFF
@joehendrix I changed the default to `LLVM=OFF` for now to avoid
disrupting existing projects. It will become `LLVM=ON` after we have
tested it more, and have the JIT integrated.

@kha Could you please set a new Azure pipeline job for `LLVM=ON`?
2019-08-01 10:15:43 -07:00
Joe Hendrix
e5d3a40d82 chore(azure-pipelines): Ensure build is with LLVM 2019-07-31 18:21:49 -07:00
Joe Hendrix
a113832342 chore(CMakeLists): Typo 2019-07-31 18:21:49 -07:00
Joe Hendrix
37ff241467 feat(CMakeLists): Add option to link in LLVM.
This updates cmake and Lean to link against the LLVM libraries.
2019-07-31 18:21:49 -07:00
Leonardo de Moura
1016309d1f feat(library/init/lean/path): always add builtin search path
We also add "." (i.e., current directory) if `LEAN_PATH` is not defined.
Users may still override stdlib since we add the builtin search path in the end.

@dselsam You should now be able to compile your project without setting `LEAN_PATH`

cc @kha
2019-07-31 18:13:17 -07:00
Leonardo de Moura
b221b09ad5 chore(library/init, frontends/lean): ensure old and new parser use the same command for initializing quotient module 2019-07-31 17:07:05 -07:00
Leonardo de Moura
bfb5bd3752 feat(library/init/lean/elaborator): add universe and universes elaborators 2019-07-31 16:46:02 -07:00
Leonardo de Moura
fe9908cad3 chore(tests/playground/persistentarray): fix test 2019-07-31 16:02:21 -07:00
Leonardo de Moura
46f361daab feat(library/init/lean/elaborator): add open command elaborator 2019-07-31 15:58:04 -07:00
Leonardo de Moura
a9ba3773c7 fix(library/init/lean/path): add support for default.lean 2019-07-31 15:58:04 -07:00
Leonardo de Moura
8a4bc188c2 feat(library/init/data): add BinomialHeap 2019-07-31 15:13:00 -07:00
Leonardo de Moura
906272d7e9 feat(library/init/data/list/basic): add eraseIdx 2019-07-31 15:04:43 -07:00
Leonardo de Moura
b2ff6bfd9f fix(library/relative.py): Windows and Linux builds 2019-07-30 18:56:34 -07:00
Leonardo de Moura
b0c84874ba chore(runtime/compact): add additional comments 2019-07-30 17:58:15 -07:00
Sebastian Ullrich
55104ad0c6 chore(library/compiler/csimp): remove wrong assertion 2019-07-30 17:52:43 -07:00