Commit graph

24104 commits

Author SHA1 Message Date
Leonardo de Moura
0714716477 fix: file and import names, tests and stage0
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2019-10-04 17:04:02 -07:00
Leonardo de Moura
a1b811e298 chore: add new stage0 2019-10-04 14:45:59 -07:00
Leonardo de Moura
b75b7be0b3 chore: delete old stage0 2019-10-04 14:40:18 -07:00
Leonardo de Moura
ce487517d1 chore: update stage0 2019-10-04 14:37:33 -07:00
Leonardo de Moura
a2abbdbf9a chore: fix imports using script
This is just a draft.
```
for f in `find . -name '*.lean'`; do echo $f; gsed "/^import/s/\b\(.\)/\u\1/g" $f > tmp; gsed "/^Import/s/Import/import/g" tmp > $f; done
```
2019-10-04 14:34:58 -07:00
Leonardo de Moura
b44e9c8d64 chore: update stage0 2019-10-04 14:20:22 -07:00
Leonardo de Moura
e596089a2d chore: one module per import command 2019-10-04 12:27:47 -07:00
Daniel Selsam
a82266c652 feat(library/init/lean/typeclass): #synth with tabled resolution 2019-10-03 17:23:53 -07:00
Leonardo de Moura
45d664ff25 fix(library/init/lean/compiler/ir/livevars): bug at updateLiveVars 2019-10-02 16:50:37 -07:00
Leonardo de Moura
e9bcbd5b0d fix(library/init/lean/compiler/ir/unboxresult): reject recursive types 2019-10-02 16:50:37 -07:00
Leonardo de Moura
4a219b6bd2 feat(library/init/lean/compiler/ir): add [unbox] attribute 2019-10-02 16:50:37 -07:00
Leonardo de Moura
cc18c0ef91 feat(library/init/lean/expr): add Expr.hasFVar and Expr.hasMVar
cc @dselsam
2019-10-02 10:07:26 -07:00
Leonardo de Moura
902e564517 chore(stage0): update 2019-10-02 10:07:26 -07:00
Sebastian Ullrich
cae1009175 fix(library/init/data/list/aux): rename to basic_aux.lean
`aux` is a reserved filename on Windows

/cc @leodemoura
2019-10-02 12:30:29 +02:00
Leonardo de Moura
509a5db284 chore(stage0): update 2019-10-01 16:48:04 -07:00
Leonardo de Moura
411f397654 refactor(library/init/data/list): new name convention for List functions
cc @dselsam @kha
2019-10-01 15:15:02 -07:00
Leonardo de Moura
6ad9d58b0f fix(library/init/lean/compiler/neverextractattr): auxiliary declarations should inherit @[neverExtract] attribute 2019-10-01 14:57:16 -07:00
Leonardo de Moura
70a90ca73e feat(library/init/lean/parser/identifier): allow ! and ? in the identifiers 2019-10-01 14:45:07 -07:00
Leonardo de Moura
9d2eadc754 chore(library/init/lean/compiler): delete @[effectful] 2019-10-01 14:08:31 -07:00
Leonardo de Moura
81847302a7 feat(library/compiler): replace @[effectful] with @[neverExtract] 2019-10-01 14:06:08 -07:00
Leonardo de Moura
ccd135b0e9 chore(stage0): update 2019-10-01 14:00:52 -07:00
Leonardo de Moura
a507145eb1 feat(library/init/lean/level): add instance : HasBeq Level 2019-10-01 09:47:44 -07:00
Leonardo de Moura
18f461bb37 chore(stage0): update 2019-09-30 17:17:58 -07:00
Leonardo de Moura
261c0b9c24 feat(frontends/lean): add panic! macro
cc @dselsam
2019-09-30 17:16:19 -07:00
Leonardo de Moura
75bdc8712e feat(library/compiler): disable a few optimizations for declarations tagged with @[effectful]
@kha @dselsam:
The main motivation for this change are functions such as `panic`.
I marked `panic` with the attribute `@[effectful]`.
Here is the summary of the changes. If `f` is marked as `@[effectful]`
1- Compiler will not perform common subexpression elimination on terms of the form `f ...`.
2- Compiler will not extract closed terms of the form `f ...`.
3- Compiler will throw an error if `f` is partially applied.
2019-09-30 16:53:11 -07:00
Leonardo de Moura
3d7a7c7e91 feat(library/init/util): add panic primitive 2019-09-30 16:23:18 -07:00
Leonardo de Moura
282f531f54 chore(stage0): update 2019-09-30 16:14:11 -07:00
Leonardo de Moura
2b252a441e feat(library/init/lean/declaration): add ConstantInfo.instantiateTypeUnivParams and ConstantInfo.instantiateValueUnivParams
cc @dselsam

See new test for an example.
2019-09-30 15:46:19 -07:00
Leonardo de Moura
faebe15a7f feat(library/init/lean/expr): add efficient instantiate1
cc: @dselsam
2019-09-30 14:33:32 -07:00
Leonardo de Moura
d6ea1d1a3f feat(frontends/lean/builtin_cmds): add #synth command 2019-09-24 11:32:43 +08:00
Leonardo de Moura
e9d16511c1 chore(stage0): update 2019-09-24 11:20:04 +08:00
Leonardo de Moura
345cc22f79 feat(frontends/lean/elaborator): do not create checkpoint at let x := v; 2019-09-21 10:27:30 -07:00
Leonardo de Moura
097a127c69 feat(util/map_foreach): add phashmap_foreach, fix smap_foreach, update stage0 2019-09-20 14:22:03 -07:00
Sebastian Ullrich
ce558b6a9e doc(library/compiler/ir_interpreter): update docs 2019-09-20 10:46:33 +02:00
Leonardo de Moura
ac2871e15c chore(stage0): update 2019-09-19 10:48:37 -07:00
Leonardo de Moura
0bd268fc96 fix(library/compiler/erase_irrelevant): add elim_array_cases 2019-09-19 10:47:05 -07:00
Leonardo de Moura
a4b860b92a fix(runtime): missing Array.data primitive 2019-09-19 10:27:10 -07:00
Leonardo de Moura
a7d616605a fix(runtime/lean): missing primitive 2019-09-19 09:54:03 -07:00
Sebastian Ullrich
31c170117e feat(frontends/lean/builtin_cmds,library/compiler/ir_interpreter): reimplement #eval 2019-09-19 17:52:18 +02:00
Sebastian Ullrich
61819bee6d refactor(library/compiler/ir_interpreter): make box_t/unbox_t total 2019-09-19 17:51:51 +02:00
Leonardo de Moura
2abca22e00 fix(kernel/instantiate): compilation problem on Windows 2019-09-18 18:41:59 -07:00
Leonardo de Moura
8148136aa9 fix(util/nat): nat::get_small_value must return size_t since unbox now returns size_t 2019-09-18 17:13:46 -07:00
Leonardo de Moura
b36caf701a chore(library/print): minor improvements 2019-09-17 17:17:46 -07:00
Leonardo de Moura
eebc722f57 feat(library/init/lean/expr): add abstractRange 2019-09-17 17:17:46 -07:00
Sebastian Ullrich
a083cab532 fix(library/compiler/ir_interpreter): fix UB sequencing found by GCC 2019-09-17 09:51:24 +02:00
Leonardo de Moura
75e5f5bfd8 feat(library/init/lean/expr): expose abstract 2019-09-16 18:34:45 -07:00
Leonardo de Moura
704f90d728 feat(library/init/lean/expr): expose instantiate and instantiateRev 2019-09-16 18:29:43 -07:00
Leonardo de Moura
51955bd945 chore(kernel/instantiate): remove obsolete optimization
I also tested its effectiveness in Lean3, and I did not observe any
performance impact when compiling stdlib without it.
2019-09-16 16:09:26 -07:00
Leonardo de Moura
06327238e6 fix(library/compiler/erase_irrelevant): assertion violation
cc @Kha
2019-09-16 07:21:19 -07:00
Leonardo de Moura
306ff7d7e5 fix(library/compiler): fixes #34
`csimp` assumes constructors and `casesOn` applications match.  That
is, given `I.casesOn x ...`, then if `x` is an constructor, then it is
a constructor of the inductive datatype `I`.
The transformation `erase_irrelevant` was violating this property when
it mixes `Decidable` and `Bool`. We fix this issue by mapping
`Decidable.casesOn`, `Decidable.isTrue` and `Decidable.isFalse` to
`Bool.casesOn`, `Bool.true` and `Bool.false` respectively.
2019-09-13 10:20:50 -07:00