Commit graph

24 commits

Author SHA1 Message Date
Sebastian Ullrich
99ab0e9d67 refactor(library/messages): make an object_ref 2018-09-11 13:55:25 -07:00
Leonardo de Moura
f5ac6875a6 chore(frontends/lean/json): style 2018-09-08 16:23:48 -07:00
Leonardo de Moura
81a694e73c chore(frontends/lean): remove dead code 2018-09-08 15:44:49 -07:00
Leonardo de Moura
fabfe32ca5 chore(*): remove unnecessary scoped_ext dependencies 2018-09-08 15:42:48 -07:00
Leonardo de Moura
2315bc4653 chore(library): remove documentation environment extension 2018-09-07 12:09:41 -07:00
Leonardo de Moura
78f4edaf57 chore(frontends/lean): remove info_manager and interactive modules 2018-09-04 17:22:16 -07:00
Leonardo de Moura
ae18cee0ea chore(library/module): remove pos_info tracking
We will use a completely different approach in Lean4
2018-08-27 15:55:57 -07:00
Leonardo de Moura
82095cc018 refactor(kernel): split declaration into declaration and constant_info
This is just another step towards the design described at commit 16598391a07d4a
2018-08-22 17:53:11 -07:00
Leonardo de Moura
fd5bfc7dfe refactor(kernel): simplify binder_info
Now, it is an enumeration type like its Lean counterpart.
2018-06-20 15:31:40 -07:00
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
Leonardo de Moura
75c63ec921 refactor(*): list<name> ==> obj_list<name> 2018-05-23 15:48:43 -07:00
Leonardo de Moura
bdea7d420d chore(*): type_context ==> type_context_old 2018-03-05 12:38:24 -08:00
Leonardo de Moura
bf0d785888 feat(library/messages, frontends/lean): optional end position for messages
We need this information to be able to fix issues with the transient
message boxes feature (#1667).
2017-06-15 10:47:58 -07:00
Gabriel Ebner
595cbb8fe9 refactor(*): task<T>, log_tree, cancellation_token 2017-03-23 08:57:52 +01:00
Sebastian Ullrich
9b5e7ddcda feat(frontends/lean/interactive,emacs): hide colon separator in front of pretty-printed types 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
803d3073ae feat(frontends/lean): add interactive.type_formatter attribute and use it to pretty print interactive tactics 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
3ae4d0fbee feat(shell/completion,emacs/lean-company): provide doc string and location with completion candidate 2017-01-10 16:19:32 +01:00
Gabriel Ebner
90ab29d7a3 chore(CMakeLists): rename misleading LEAN_SERVER option 2017-01-05 18:08:59 -08:00
Gabriel Ebner
45d0525e52 feat(shell,emacs): new lean server protocol 2016-12-06 17:14:29 -08:00
Gabriel Ebner
61b70a71ce refactor(shell/server): move auto-completion code to a separate file 2016-12-06 17:14:29 -08:00
Gabriel Ebner
a8df381d20 feat(*): parallel compilation 2016-11-29 11:12:40 -08:00
Sebastian Ullrich
9bb167d619 chore(frontends/lean): bring back beautiful #ifdefs around json.hpp usage 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
ef633abec7 chore(*): fix test and style 2016-11-08 08:37:41 -08:00
Sebastian Ullrich
ba1b6165e3 feat(frontends, shell): implement basic server 'info' command 2016-11-08 08:37:41 -08:00
Renamed from src/shell/json.cpp (Browse further)