Commit graph

7608 commits

Author SHA1 Message Date
Leonardo de Moura
80d247eaff fix(src/util): make sure thread stack size is > LEAN_STACK_BUFFER_SPACE 2016-12-03 12:05:01 -08:00
Leonardo de Moura
8e64665259 chore(src/CMakeLists): remove support for optional Boost 2016-12-03 11:34:58 -08:00
Leonardo de Moura
a9d3f36f76 feat(util/thread,library/mt_task_queue): add lthread 2016-12-03 11:29:22 -08:00
Leonardo de Moura
aea8fd943e fix(library/mt_task_queue): save stack info at thread starting
We need this information to get accurate stack information.
2016-12-02 20:01:32 -08:00
Gabriel Ebner
bbbc790cfc feat(.travis.yml): add codecov 2016-12-02 17:01:58 -08:00
Gabriel Ebner
eea7475e57 refactor(.travis.yml): simplify travis config 2016-12-02 17:01:58 -08:00
Gabriel Ebner
7db2b8d014 fix(library/vm/vm): do not segfault in single-threaded builds 2016-12-02 16:51:10 -08:00
Gabriel Ebner
92f07720f2 refactor(emacs/load-lean): install emacs dependencies directly from (M)ELPA 2016-12-02 16:50:50 -08:00
Gabriel Ebner
9ecac28061 feat(CMakeLists,util/thread): fix build with boost 2016-12-02 16:50:03 -08:00
Gabriel Ebner
c8a821afd1 fix(library/module_mgr): do not create olean files for modules with errors 2016-12-02 16:48:18 -08:00
Leonardo de Moura
e11fd8820a refactor(library/init): create init.data folder 2016-12-02 14:23:06 -08:00
Leonardo de Moura
e237109434 fix(frontends/lean/tactic_notation): do not store position information for auxiliary terms introduced by the interactive mode
The idea is to prevent unwanted type information at lean-mode.
For example, before this commit, we would get "list.nil : ..." type
info whenever we hovered over the "end" of a "begin...end" block.
2016-12-02 09:53:24 -08:00
Gabriel Ebner
851b64dbbd feat(library/module_mgr): gracefully handle non-existing imports 2016-12-02 08:47:59 -08:00
Gabriel Ebner
26f0325e9b fix(shell/server): do not fail if module parsing throws an exception 2016-12-02 08:47:46 -08:00
Gabriel Ebner
a3daaee2e0 fix(library/mt_task_queue): reverse dependencies may already be queued
When we check whether the dependencies for a task have already been
evaluated and then accordingly move the task from waiting to queued, we
do not remove it from the reverse dependency lists it appears in.
2016-12-01 17:43:53 -08:00
Leonardo de Moura
e1a90fbe89 fix(frontends/lean/tactic_notation): fixes #1207 2016-12-01 17:16:22 -08:00
Leonardo de Moura
8defd9ac39 fix(frontends/lean/elaborator): compilation warning with clang 2016-12-01 16:10:07 -08:00
Leonardo de Moura
79d87138f0 feat(util/memory): simplify memory tracking code 2016-12-01 16:07:46 -08:00
Leonardo de Moura
10f51156b2 chore(CMakeLists): remove obsolete option 2016-12-01 14:07:56 -08:00
Gabriel Ebner
cc9f52ade6 refactor(library/mt_task_queue): more precise task_result_states
The task result state now distinguishes created/waiting/queued, which is
useful for debugging.  mt_task_queue now also correctly waits for all
tasks during destruction.
2016-12-01 11:06:08 -08:00
Leonardo de Moura
52ef17284a fix(kernel/expr, kernel/level): if caching is enabled during finalization, these modules would register a finalizer after finalization of the main thread
The deleted lines were not really needed. They were added before we had
the thread finalization code.
2016-12-01 10:16:05 -08:00
Gabriel Ebner
ae21a6cae8 feat(shell/lean): support stdin redirection in server mode
This is useful if you're debugging lean-server in an IDE which cannot
redirect stdin, and also if you want to run `gdb --args lean
--server=some.file`.
2016-12-01 10:02:14 -08:00
Gabriel Ebner
3c1f9ca370 feat(library/task_queue): operator!= for task_results 2016-12-01 10:02:14 -08:00
Gabriel Ebner
9b97dc73dc fix(library/task_queue): do not keep references to cancelled task_results in the exception
We store this exception in the task_result itself, which creates a
reference cycle.
2016-12-01 10:02:14 -08:00
Leonardo de Moura
d454cc8bcd feat(frontends/lean/elaborator): do not populate info_manager during thread finalization 2016-11-30 17:14:15 -08:00
Leonardo de Moura
73e5367fb6 fix(library/mt_task_queue): make sure thread finalizers are executed even if lean was compiled without pthread support 2016-11-30 11:42:29 -08:00
Gabriel Ebner
e070444bbf fix(library/tactic/tactic_state): do not allocate tactic_state_cell using the VM allocator 2016-11-30 14:13:18 -05:00
Leonardo de Moura
4df0f82934 fix(library/tactic/simp_lemmas): memory leak 2016-11-30 09:58:20 -08:00
Leonardo de Moura
20d0ea7925 fix(library/module_mgr): invalid memory read
@gebner I was getting the following error with valgrind:

==9902== Invalid read of size 1
==9902==    at 0xAD209B: lean::module_mgr::mark_out_of_date(std::string const&, lean::buffer<std::string, 16u>&) (module_mgr.cpp:24)
==9902==    by 0xAD3EF5: lean::module_mgr::invalidate(std::string const&) (module_mgr.cpp:286)
==9902==    by 0x986A84: lean::server::handle_sync(nlohmann::basic_json<std::map, std::vector, std::string, bool, long, unsigned long, double, std::allocator> const&) (server.cpp:141)
==9902==    by 0x986603: lean::server::handle_request(nlohmann::basic_json<std::map, std::vector, std::string, bool, long, unsigned long, double, std::allocator> const&) (server.cpp:105)
==9902==    by 0x986313: lean::server::run() (server.cpp:90)
==9902==    by 0x975E98: main (lean.cpp:383)
==9902==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==9902==
==9902==
==9902== Process terminating with default action of signal 11 (SIGSEGV)
==9902==  Access not within mapped region at address 0x0
==9902==    at 0xAD209B: lean::module_mgr::mark_out_of_date(std::string const&, lean::buffer<std::string, 16u>&) (module_mgr.cpp:24)
==9902==    by 0xAD3EF5: lean::module_mgr::invalidate(std::string const&) (module_mgr.cpp:286)
==9902==    by 0x986A84: lean::server::handle_sync(nlohmann::basic_json<std::map, std::vector, std::string, bool, long, unsigned long, double, std::allocator> const&) (server.cpp:141)
==9902==    by 0x986603: lean::server::handle_request(nlohmann::basic_json<std::map, std::vector, std::string, bool, long, unsigned long, double, std::allocator> const&) (server.cpp:105)
==9902==    by 0x986313: lean::server::run() (server.cpp:90)
==9902==    by 0x975E98: main (lean.cpp:383)
2016-11-30 09:50:08 -08:00
Gabriel Ebner
000d97a9a6 fix(frontends/lean/parser): wrap snapshot in shared_ptr 2016-11-30 11:27:02 -05:00
Gabriel Ebner
db67c1fde3 chore(CMakeLists): make python dependency optional 2016-11-30 11:27:02 -05:00
Gabriel Ebner
c3f72ec0d8 fix(library/module_mgr): do not copy module_info 2016-11-30 11:26:59 -05:00
Leonardo de Moura
2309e35296 fix(frontends/lean): position information for by tac
Now, Ctrl-c-Ctrl-g also works when hovering the beginning of the tactic
instead of the beginning of the `by` token.
The idea is to make the behavior consistent with `begin...end` blocks.
2016-11-29 17:08:10 -08:00
Leonardo de Moura
3617451775 fix(src/library/task_queue): remove spurious message
@gebner Could you please confirm this is a spurious message?
2016-11-29 16:48:29 -08:00
Leonardo de Moura
b85ccefbff fix(frontends/lean/builtin_cmds): information position (use the same approach used in other commands) 2016-11-29 16:47:34 -08:00
Daniel Selsam
7bfe0aedb0 feat(library/tactic/simplify): better debug.simplify.try_rewrite tracing 2016-11-29 14:46:35 -08:00
Leonardo de Moura
a76c2d37a7 chore(bin,src,src/emacs): delete linja 2016-11-29 14:14:42 -08:00
Leonardo de Moura
d40e97b4bc chore(*): compilation errors, fix style, fix warnings 2016-11-29 11:35:01 -08:00
Gabriel Ebner
df635b56af fix(frontends/lean/definition_cmds): correctly copy _refl_lemma attributes 2016-11-29 11:12:44 -08:00
Gabriel Ebner
f756e9ed92 fix(shell/lean): set global ios 2016-11-29 11:12:44 -08:00
Gabriel Ebner
d8ee8d6ea7 fix(tests/util/exception): adapt to changed superclass of interrupted 2016-11-29 11:12:44 -08:00
Gabriel Ebner
3ecfddcbd5 fix(*): fix build 2016-11-29 11:12:43 -08:00
Gabriel Ebner
7ff2a77d67 feat(library/vm/vm_task): expose task_result objects to VM 2016-11-29 11:12:43 -08:00
Gabriel Ebner
e448e4e129 refactor(util/task_queue): merge module_task into task and cancel by position 2016-11-29 11:12:43 -08:00
Gabriel Ebner
aa03dc03b4 refactor(library/tactic/simp_lemmas): mark rfl-lemmas with a _refl_lemma attribute 2016-11-29 11:12:43 -08:00
Gabriel Ebner
b668844afe chore(*): fix style errors 2016-11-29 11:12:43 -08:00
Gabriel Ebner
e1cb1a8cd2 feat(util/task_queue,library/versioned_msg_buf): rudimentary support for task interruption 2016-11-29 11:12:43 -08:00
Gabriel Ebner
f69164d621 fix(library/aux_definition): type-check auxiliary definitions immediately 2016-11-29 11:12:43 -08:00
Gabriel Ebner
56f895d6d8 feat(kernel/type_checker): option to disable delayed proof-checking 2016-11-29 11:12:43 -08:00
Gabriel Ebner
26b0138771 refactor(kernel/type_checker): factor out part for definition checking 2016-11-29 11:12:43 -08:00