Lean 4 fork for HoTT-compatible kernel extensions (Path types, transport, HITs). Maintained against upstream leanprover/lean4.
In this commit, we replace the option `LEAN_DEFERRED_FREE` with `LEAN_LAZY_RC`. The idea is to match the nomenclature used in the literature. See paper: https://dl.acm.org/citation.cfm?id=964019 The following slide deck summarizes the paper: http://www.hboehm.info/popl04/refcnt.pdf We also implement the very simple approach described on this paper where a `del(o)` just puts `o` in the "to free" list, and each allocation frees at most one object. As pointed out in the paper above lazy RC may prevent a lot of memory from being reclaimed. For now, I am keeping the new option disabled. That being said, the test `arith_eval_nat.lean` is 29% faster when using lazy RC, and beats the OCaml version. In the following paper https://www.microsoft.com/en-us/research/wp-content/uploads/2017/01/tm567-1.pdf a separate thread keeps processing the "to free" list. However, I think this approach is not compatible with our `object_memory_kind::STHeap` trick. Tomorrow, I will measure the space overhead when compiling the Lean corelib using Lazy RC using my linux desktop cc @kha |
||
|---|---|---|
| .github | ||
| bin | ||
| doc | ||
| gen | ||
| images | ||
| lean4-mode | ||
| library | ||
| script | ||
| src | ||
| tests | ||
| .appveyor.yml | ||
| .clang-format | ||
| .codecov.yml | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| LICENSE | ||
| README.md | ||
| License | Windows | Linux / macOS | Test Coverage | Chat |
|---|---|---|---|---|
![]() |
About
- Homepage
- Theorem Proving in Lean
- Core library
- Change Log
- FAQ
- For HoTT mode, please use Lean2.
Installation
Stable and nightly binary releases of Lean are available on the homepage. For building Lean from source, see the build instructions.
Miscellaneous
- Building Doxygen Documentation:
doxygen src/Doxyfile - Coding Style
- Library Style Conventions
- Git Commit Conventions
- Automatic Builds
- Syntax Highlight Lean Code in LaTeX
- Exporting, and reference type-checkers
