lean4-htt/src
Leonardo de Moura 13c532d0d4 fix(*): truncation bugs
- Lean strings (like std::string) may contain null characters. The
  codebase was ignoring this issue.

- We now have a wrapper `string_ref` for wrapping Lean string objects in
  C++. This wrapper also implements correctly the coercions std::string <-> string_ref.
  Remark: I also found a few places where the code relies on the
  following property which is not true
  Forall s : std::string, std::string(s.c_str()) == s

- `name` object wrapper was assuming that all numerals were small
  `nat` values. This is true in most cases, but the system would
  crash when processing if it is a big number.

- The commit tries to make sure runtime/util/kernel are correct.
  Modules that will be deleted contain many `TODO` comments
  indicating they may crash and/or produce incorrect results
  when strings contain null characters and numerals are big.

cc @kha

@kha: I thought about using `string` instead of `string_ref`.
We consistently use `std::string`. So, it should be fine, but I
was concerned about code readability.

After we bootstrap Lean4, we will be able to delete `lean::list`
template, and rename `lean::list_ref` to `lean::list`.

I am going to add `pair_ref` for wrapping Lean pair objects.
If we use `lean::string` instead of `lean::string_ref`, then
we should also use `lean::pair` instead of `lean::pair_ref`.
But, there is a problem in this case since we have
https://github.com/leanprover/lean4/blob/master/src/util/pair.h#L13
:(
2018-06-15 16:05:11 -07:00
..
cmake chore(cmake/Modules/cpplint): disable yet another buggy check 2018-06-06 15:28:44 -07:00
frontends/lean fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
init refactor(kernel): remove quotitent normalizer extension 2018-06-01 10:52:17 -07:00
kernel fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
library fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
runtime fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
shared
shell chore(library/export): remove text export module 2018-06-08 13:36:36 -07:00
tests fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
util fix(*): truncation bugs 2018-06-15 16:05:11 -07:00
CMakeLists.txt chore(checker): remove leanchecker 2018-06-07 16:28:54 -07:00
CTestConfig.cmake
CTestCustom.cmake.in
Doxyfile
githash.h.in fix(library): store and validate Lean version of .olean files 2018-01-23 11:14:18 -08:00
memcheck.supp
version.h.in chore(leanpkg/lean_version): recognize nightlies as releases separate from master 2018-03-20 15:14:45 -07:00