Commit graph

17195 commits

Author SHA1 Message Date
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
Sebastian Ullrich
2c12f9d0f6 chore(runtime/object): LEAN_FAKE_FREE: assert on double-free 2019-07-30 17:52:43 -07:00
Sebastian Ullrich
d09c512784 chore(library/module): lsan: ignore module objects 2019-07-30 17:52:43 -07:00
Sebastian Ullrich
20b6502aaf fix(runtime/compact): badly aligned "field" in terminator 2019-07-30 17:52:43 -07:00
Leonardo de Moura
6b62ed0c99 fix(library/relative.py): macos path names are case insensitive
The MacOS file system is not case sensitive.
Thus, the Lean path normalization function converts all characters in the pathname to lowercase.
We use the auxiliary Python script relative.py in our makefile.
The Python function `os.path.relpath` normalizes pathnames, but it only converts all characters to lowercase on Windows :(
Thus, Lean outputs the dependency files such as
```
/users/leonardodemoura/projects/lean4/library/init/lean/smap.olean
```
In Python, the current directory is
```
/Users/leonardodemoura/projects/lean4/library
```
Thus, `os.path.relpath` produces
```
../../../../../users/leonardodemoura/projects/lean4/library/init/lean/smap.olean
```
instead of
```
init/lean/smap.olean
```
2019-07-30 17:47:05 -07:00
Leonardo de Moura
2f5b2b2409 feat(library/init/lean/path): add realPathNormalized 2019-07-28 20:52:41 -07:00
Leonardo de Moura
4b10f09baf chore(stage0): update 2019-07-28 20:13:01 -07:00
Leonardo de Moura
378d75b3b4 feat(library/init/lean/path): use toLower at normalizePath if file system is case-insensitive 2019-07-28 19:50:01 -07:00
Leonardo de Moura
6cf8571e37 feat(library/init/system/platform): add System.Platform.isOSX 2019-07-28 19:49:40 -07:00
Leonardo de Moura
a48d635004 chore(library/init/lean/path): include search path in error message
Trying to understand why the Windows build is failing at Azure.
2019-07-28 19:11:01 -07:00
Leonardo de Moura
10fe453cf6 test(tests/lean/run/ubscalar): save UB scalar field test 2019-07-28 10:11:35 -07:00
Leonardo de Moura
1d0d65893b fix(library/init/lean/path): user normalizePathSeparators at moduleNameOfFileName 2019-07-28 10:09:51 -07:00
Leonardo de Moura
17e5f0b719 chore(stage0): update 2019-07-28 09:54:57 -07:00
Leonardo de Moura
fb14110b22 fix(library/compiler/llnf): sort scalar fields by size to avoid UB 2019-07-28 09:53:53 -07:00
Leonardo de Moura
e0d1892d72 fix(library/init): add normalizePathSeparators
Trying to fix broken tests on Windows.
2019-07-28 08:21:48 -07:00
Leonardo de Moura
ff6b868440 chore(library/module): remove dead code 2019-07-27 19:03:07 -07:00