Commit graph

804 commits

Author SHA1 Message Date
Jared Roesch
dc4086d0ed feat(library/vm/process): add basic process support 2017-03-28 18:08:06 -07:00
Gabriel Ebner
318910f99b refactor(frontends/lean/parser): store snapshots in a lazy async list 2017-03-27 14:00:53 -07:00
Gabriel Ebner
34586a2e82 feat(util/log_tree): deindent _next nodes 2017-03-24 07:04:35 +01:00
Gabriel Ebner
fdd80c12dd feat(util/log_tree): inherit description 2017-03-24 07:04:35 +01:00
Gabriel Ebner
69322cd523 fix(util/task): evaluate dependencies iteratively 2017-03-23 09:16:49 +01:00
Gabriel Ebner
73826eee54 chore(util/rb_tree): fix clang warning 2017-03-23 09:07:50 +01:00
Gabriel Ebner
5e29fe227e fix(shell/server): set global ios in info and complete tasks 2017-03-23 09:03:43 +01:00
Gabriel Ebner
dfb5dad1a3 chore(util/log_tree): style 2017-03-23 09:03:43 +01:00
Gabriel Ebner
c7ca21625c feat(util/log_tree): annotate nodes with detail levels 2017-03-23 09:03:43 +01:00
Gabriel Ebner
0853d9fd2a fix(util/thread): fix single-threaded build 2017-03-23 09:03:42 +01:00
Gabriel Ebner
e35968cda1 feat(util/memory): implement get_current_rss using the jemalloc API 2017-03-23 09:01:00 +01:00
Gabriel Ebner
27f6f2a951 perf(util/log_tree): do not traverse the whole tree every time 2017-03-23 09:00:59 +01:00
Gabriel Ebner
feb13c47f8 perf(util/task_builder): speed up traverse 2017-03-23 09:00:59 +01:00
Gabriel Ebner
7036bec999 fix(util/cancellable): fix quadratic runtime with many children 2017-03-23 09:00:59 +01:00
Gabriel Ebner
d26e870aa5 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Gabriel Ebner
cfa0f798ac fix(util/log_tree): fix memory leak 2017-03-23 09:00:59 +01:00
Gabriel Ebner
796097ec31 fix(util/log_tree): fix reference cycle between log_tree and tasks 2017-03-23 09:00:59 +01:00
Gabriel Ebner
3c515cc772 refactor(util/log_tree): use for_each 2017-03-23 09:00:59 +01:00
Gabriel Ebner
b6e79d646d fix(util/cancellable): actually set interrupt flag 2017-03-23 09:00:59 +01:00
Gabriel Ebner
f85468159d fix(library/module): prevent reference to previous versions 2017-03-23 09:00:59 +01:00
Gabriel Ebner
fa232a3a1a fix(util/timer): fix valgrind warning 2017-03-23 09:00:59 +01:00
Gabriel Ebner
901cef6629 refactor(util/thread): simplify thread life-cycle 2017-03-23 09:00:59 +01:00
Gabriel Ebner
667d06108a chore(*): fix clang warnings 2017-03-23 09:00:58 +01:00
Gabriel Ebner
d22bfbd12a feat(util/debug): add version of lean_assert that also works in non-debug builds 2017-03-23 08:57:56 +01:00
Gabriel Ebner
823c451a51 fix(util/thread): detach unjoined threads 2017-03-23 08:57:56 +01:00
Gabriel Ebner
2799375d24 chore(*): style 2017-03-23 08:57:56 +01:00
Gabriel Ebner
a6d2e11a91 refactor(util/task): remove needs_separate_thread option 2017-03-23 08:57:56 +01:00
Gabriel Ebner
bbe30e1bc5 feat(library/module): only report sorry once per declaration 2017-03-23 08:57:56 +01:00
Gabriel Ebner
45820531c4 refactor(util/task): remove switch to disable priority inversion 2017-03-23 08:57:56 +01:00
Gabriel Ebner
26ba9c23a7 refactor(util/task): add eager execution 2017-03-23 08:57:56 +01:00
Gabriel Ebner
3eba8d3ffc refactor(util/task): do not propagate errors 2017-03-23 08:57:56 +01:00
Gabriel Ebner
5f872912e0 refactor(shell/lean): set exit status 1 iff at least one error was reported 2017-03-23 08:57:56 +01:00
Gabriel Ebner
595cbb8fe9 refactor(*): task<T>, log_tree, cancellation_token 2017-03-23 08:57:52 +01:00
Leonardo de Moura
3f42e5fbd9 chore(util/rb_tree): style 2017-03-22 08:31:48 -07:00
Leonardo de Moura
59d1b1ee2e fix(util/rb_tree): avoid warning
see #1473
2017-03-22 08:24:17 -07:00
Leonardo de Moura
15c83404ee chore(src/util/rb_tree): add more assertions to catch bugs in cmp (e.g., we provided a non transitive comparison predicate) 2017-03-17 13:47:11 -07:00
Leonardo de Moura
9762fc0417 chore(src/util/rb_tree): add debugging utils 2017-03-16 14:44:09 -07:00
Leonardo de Moura
cad379333d feat(util/memory_pool): put limit on the size of memory_pool free_lists
See #1405

Memory consumption is still high, but I didn't manage to cross the 2Gb
limit anymore with this commit even after hundreds of modifications.

@gebner I'm not seeing a big difference betwee Lean without memory_pool,
with bounded memory_pool and unbounded memory_pool. We may even consider
removing it in the future after a more careful benchmarking.

In the benchmark (https://gist.github.com/leodemoura/b27fb4203a13a67274b388a602149303),
I'm getting the following numbers:

- No memory_pool: runtimes between 3.532s - 3.556s

- With memory_pool bounded by 8192: runtimes between 3.32s - 3.44s

- With memory_pool (with no limit): runtimes between 3.32s - 3.44s

On the other hand, the small object allocator makes a big difference.
I used your list_rev.lean example.

- with:    2.62s
- without: 3.75s
2017-02-28 15:16:43 -08:00
Leonardo de Moura
db5b709d9c feat(CMakeLists,util): add CUSTOM_ALLOCATORS=OFF compilation option 2017-02-28 11:13:54 -08:00
Leonardo de Moura
ba641ce29f feat(CMakeLists,util): add TRACK_CUSTOM_ALLOCATORS=ON compilation option 2017-02-28 10:38:09 -08:00
Gabriel Ebner
7e3be51a52 chore(*): remove last remnants of mpfr 2017-02-24 21:42:58 +01:00
Leonardo de Moura
7eef501ae1 chore(*): remove mpfr dependency
closes #1380
2017-02-17 20:36:53 -08:00
diakopter
19606fd197 chore(util,kernel,library): clang warnings 2017-02-17 20:01:34 -08:00
Sebastian Ullrich
9d8c84713c refactor(*): reduce exception context info from expr to pos_info 2017-02-17 13:45:57 +01:00
Leonardo de Moura
e551b4ff09 fix(src/util/timer): uninit var 2017-02-13 18:15:01 -08:00
Leonardo de Moura
1306e56381 feat(library/vm): check heartbeat in function calls 2017-02-12 12:29:32 -08:00
Leonardo de Moura
7112f6d685 feat(library/tactic): add try_for tactic 2017-02-11 20:35:42 -08:00
Gabriel Ebner
d8c2be1a33 feat(shell/server): limit full message updates to once every 200ms 2017-02-10 09:01:55 +01:00
Leonardo de Moura
b13d0e1b4f chore(util/buffer): use std::move 2017-02-09 13:51:33 -08:00
Leonardo de Moura
01eb27d4a4 feat(util): "deterministic timeout" option
closes #1134

see #1362

This feature is implemented using a "hearbeat" thread local counter.
We reset the counter whenever we start a new task.
The counter is incremented when:

  1- An object is allocated using small_object_allocator (e.g., VM object)
  2- An object is allocated using memory_pool (e.g., expr, level, rb_tree nodes, list cons-cells, etc)
  3- check_system(...) invocations

We check if the threshold was reached at check_system.
The option --timeout=num can be used to set the limit (in thousands).
The default is unbounded in batch mode.
In server mode, the default is 100000. We can compile the standard library with --timeout=12000

I did not perform many experiments to check how precise this counter is.
I added a new Emacs configuration setting to change the server default.

Here is the wall clock time for different values of --timeout for the
command used on issue #1134

time ../../bin/lean -j 0 --timeout=20000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.070s
user	0m1.032s
sys	0m0.036s

time ../../bin/lean -j 0 --timeout=40000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.777s
user	0m1.676s
sys	0m0.044s

time ../../bin/lean -j 0 --timeout=50000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m1.985s
user	0m1.920s
sys	0m0.056s

time ../../bin/lean -j 0 --timeout=100000 loop.lean
loop.lean:1:0: error: (deterministic) timeout detected at 'expression equality test' (potential solution: increase timeout threshold)

real	0m3.587s
user	0m3.564s
sys	0m0.020s
2017-02-07 13:56:12 -08:00