lean4-htt/src
Leonardo de Moura 9b29572604 feat(kernel/type_checker): improve infer_let
Before this commit, given a term `let x : t := v in b`, `infer_type`
would return `let x : t := v in T` where `T` is the type of `b` in
the local context extended with declaration `x : t := v`.
This is correct, but it produces unnecessarily large terms
in the new compiler stack which makes a heavy use of let-expressions.
We noticed the problem when the size of some .olean files were 100x
bigger. For example, `repr.olean` increased from 136Kb to
13Mb after we started saving the `._cstage1` (code after after
simplification) in the `.olean` files.

The new implementation relies on the fact that `T` seldom depends on
`x`. So, in most cases, the result is just `T` instead of `let x : t := v in T`

After this change, the new .olean files are at most 56% bigger than
.olean files not containing `._cstate1` code. This seems reasonable
since most of our .olean files only contain code and we are storing a
copy of each function.

@kha The new lcnf format keeps exposing problems :)
2018-09-17 18:25:27 -07:00
..
cmake
frontends/lean refactor(library/init/core): change ite signature 2018-09-17 14:27:28 -07:00
init feat(*): use new inductive datatype module 2018-09-06 18:09:22 -07:00
kernel feat(kernel/type_checker): improve infer_let 2018-09-17 18:25:27 -07:00
library chore(library/compiler): skip type checking for _cstage1 declarations 2018-09-17 14:45:04 -07:00
runtime chore(runtime/object): fix comment 2018-09-11 14:31:14 -07:00
shared
shell chore(shell/lean): fix unused variable warning 2018-09-12 16:51:59 -07:00
tests chore(runtime/object): store function pointer as void * inside closure 2018-09-11 14:27:45 -07:00
util refactor(library/module_mgr): minor refactorings 2018-09-11 13:55:25 -07:00
CMakeLists.txt chore(tests/shell/test): remove 2018-09-08 18:37:58 -07:00
CTestConfig.cmake
CTestCustom.cmake.in
Doxyfile
githash.h.in
memcheck.supp
version.h.in