Leonardo de Moura
bc0c0ee9bc
chore(tests): fix tests
2019-06-24 15:48:11 -07:00
Leonardo de Moura
aadb07d5e4
chore(tests/lean): remove/fix tests
2019-06-07 09:56:11 -07:00
Leonardo de Moura
1cdadba4b2
fix(library/compiler/csimp): type error
...
@kha This is another instance of a problem we discussed last summer.
I guess there are many more instances like this one that we are not handling.
Recall that we want to preserve types at `csimp` because we eventually
want to allow users to use equational theorems as rewriting rules during
compilation.
However, some of the transformations that `csimp` perform do not
preserve typeability in CIC.
Moreover, some of the optimizations require type inference.
I see the possible long term solutions:
1- Erase types and proofs as soon as possible. The main drawback here is
that we would have to develop an approach for translating Lean theorems
into valid rewriting rules for lambda pure. For example, the following
theorem should not be used as a rewriting rule after we erase types.
```
forall (xs : List Unit) (f : Unit -> Unit), List.map f xs = List.map id xs
```
BTW, I don't want to abandon the idea of using lemmas as rewriting rules in
the compiler.
2- Go over `csimp` and other compiler steps and make sure they work
properly even when `type_checker::infer_type` fails.
2019-06-03 17:36:40 -07:00
Leonardo de Moura
5ee7a211cf
chore(tests/lean/run/rc_tests): fix test
2019-05-22 18:46:30 -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
e58949e938
chore(library/init/control/id): rename id monad to Id
2019-03-29 16:45:52 -07:00
Leonardo de Moura
4149a25186
chore(tests): fix tests
2019-03-29 11:25:26 -07:00
Leonardo de Moura
e46018bfd8
chore(tests/lean): move test to tests/lean/run
2019-03-28 18:21:10 -07:00
Leonardo de Moura
e71249f6b3
chore(tests): fix tests
2019-03-27 14:06:23 -07:00
Leonardo de Moura
4bf41f0036
chore(tests/lean/run/coroutine): fix test
2019-03-21 16:46:53 -07:00
Leonardo de Moura
7bb015c6b3
chore(tests/lean): fix more tests
2019-03-21 15:11:05 -07:00
Leonardo de Moura
2cbdb287c3
chore(tests): fix/disable some tests
2019-03-21 15:11:05 -07:00
Sebastian Ullrich
f34d37c371
chore(tests): port tests, fix at least compiler tests
2019-03-21 15:11:05 -07:00
Sebastian Ullrich
e0bbc094ad
chore(library/init): remove coroutines from stdlib
2019-03-08 15:34:17 +01:00
Leonardo de Moura
9cc41c4f3d
chore(frontends/lean/inductive_cmds): disable broken check
...
@kha I have disabled this check. It was implemented 2 years ago by
Daniel, and I don't want to fix it. It seems you have already fixed a
bug there. AFAICT, this check is just for improving error messages.
I believe we may not even need it since the kernel now supports nested
inductive types. AFAIR, Daniel implemented this check here because the
inductive compiler was introducing a lot of auxiliary declarations
that were making the kernel error messages unreadable.
2019-03-04 11:05:21 -08:00
Leonardo de Moura
7e8f9e6f66
feat(library/compiler): add [extern] attribute
2019-02-09 18:53:44 -08:00
Sebastian Ullrich
4c0f836305
chore(shell/lean): reduce lean interface to taking a single file, assuming all dependencies have already been built
2019-01-25 18:27:38 +01:00
Leonardo de Moura
c3dfb613d5
test(tests/lean/run/rc_tests): basic explicit_rc_fn tests
2019-01-17 15:25:27 -08:00
Leonardo de Moura
607d22ae58
fix(library/compiler/csimp): bug at float_cases_on_core
...
The bug occurs when floating `cases_on` application in code of the form
```
let x := C.cases_on ...
in t
```
and when the type of `t` depends on `x`.
The issue here is that the `x` declaration disappears after the float, but the resulting type still depends on it.
We fix the bug by replacing `x` with its value in the type.
cc @kha
2018-11-30 11:40:41 -08:00
Sebastian Ullrich
6d0b3afa7e
fix(library/compiler/compiler): do not silently abort on user-given sorrys
2018-11-17 18:00:55 +01:00
Leonardo de Moura
04227701d6
chore(tests/lean/run): fix the tests
...
@kha I found the real issue with these two tests.
You have modified the compiler to ignore definitions containing `sorry` :)
2018-11-15 11:21:12 -08:00
Leonardo de Moura
d0ccaa1083
chore(tests/lean): fix tests
...
TODO: `io` modifications performed yesterday may have affected `eval`.
2018-11-15 10:56:03 -08:00
Leonardo de Moura
f404c5c446
refactor(library/init/data): make sure uint* and usize are irreducible
...
Remark: this commit breaks the support for `uint*` and `usize` in the old VM.
2018-11-06 16:55:02 -08:00
Leonardo de Moura
189b037358
chore(tests/lean/run/new_compiler): fix test
2018-10-31 13:25:01 -07:00
Leonardo de Moura
28a34e798a
feat(library/compiler/csimp): projection to field
...
The new test demonstrations this transformation.
2018-10-28 09:38:45 -07:00
Leonardo de Moura
f7f981285b
chore(tests/lean/run/display_hw_term_hack_deps): remove old test
2018-10-23 11:32:56 -07:00
Leonardo de Moura
aff6d58659
chore(tests/lean/run/new_compiler): fix test
2018-10-10 18:38:18 -07:00
Leonardo de Moura
c74f4c16ca
feat(library/kernel,library/compiler/csimp): make sure nat.rec and nat.cases_on reduce when major premise is a nat literal
2018-10-10 18:35:15 -07:00
Leonardo de Moura
338038a05e
feat(library/init/core): add inline identity function
2018-10-10 18:17:29 -07:00
Leonardo de Moura
124b4d37fe
feat(library/compiler): port simp_inductive to the new compiler stack
...
This commit also fixes a bug in the old `simp_inductive` module, and
removes now obsolete files (`compiler_step_visitor` and `old_util`).
2018-10-08 16:58:43 -07:00
Leonardo de Moura
b3451fb682
perf(library/init/lean/parser/parsec): merge ok and ok_eps
2018-09-27 15:14:37 -07:00
Leonardo de Moura
017261960c
feat(library/compiler/csimp): add float_cases_on
2018-09-24 18:10:26 -07:00
Leonardo de Moura
52d1abf0bc
feat(library/compiler): add cse to new compiler stack
2018-09-14 17:48:18 -07:00
Leonardo de Moura
e8ab46619b
chore(tests/lean/run/new_compiler): fix test
2018-09-14 16:42:53 -07:00
Leonardo de Moura
7174d53820
feat(library/compiler/csimp): distribute application over cases
2018-09-14 15:14:40 -07:00
Leonardo de Moura
31a9a22641
test(tests/lean/run/new_compiler): add test
2018-09-14 13:35:41 -07:00
Leonardo de Moura
5ed05db261
test(tests/lean/run/new_compiler): add test for new compiler stack
2018-09-14 09:46:02 -07:00
Leonardo de Moura
afd54039ab
chore(library): remove >>, we should use *>
2018-09-12 17:31:21 -07:00
Leonardo de Moura
9e305a5f26
chore(library): remove return, we should use pure
2018-09-12 16:51:11 -07:00
Leonardo de Moura
ab9e812ac5
chore(tests/lean): fix tests
2018-09-06 18:09:32 -07:00
Leonardo de Moura
208b932583
feat(library/constructions/brec_on): add brec_on and binduction_on for new inductive datatype module
...
We don't support these constructions for nested inductive types, but we
do for mutual inductives.
2018-09-05 14:46:03 -07:00
Leonardo de Moura
f335623530
feat(library/constructions/brec_on): add below and ibelow for new inductive datatype module
2018-09-05 14:46:03 -07:00
Leonardo de Moura
afb9584a63
feat(kernel): store at inductive_val whether the type is reflexive or not
2018-09-05 14:46:03 -07:00
Leonardo de Moura
4964ad660f
feat(library/constructions/no_confusion): add no_confusion for new inductive datatype module
2018-09-05 10:27:49 -07:00
Leonardo de Moura
4773a3be5f
feat(library/constructions/no_confusion): add no_confusion_type for new inductive datatype module
2018-09-05 09:55:13 -07:00
Leonardo de Moura
cc5f60c28d
test(tests/lean/run/new_inductive): add new tests
2018-09-04 18:17:13 -07:00
Leonardo de Moura
d8e7941116
feat(library/constructions/rec_on): add rec_on for new inductive datatype module
2018-09-04 17:22:16 -07:00
Leonardo de Moura
0f207380c7
test(tests/lean/run/new_inductive): add test for new inductive datatype module
2018-09-04 10:35:28 -07:00
Leonardo de Moura
69734dfb3a
chore(tests/lean): fix tests
2018-08-23 13:49:07 -07:00
Sebastian Ullrich
adfc8c9e62
chore(tests/lean/run/deriv): fix test
2018-08-23 10:38:59 -07:00