lean4-htt/src/util
Leonardo de Moura c4c548dc5d feat(*): simplify interrupt propagation
Instead of having m_interrupted flags in several components. We use a thread_local global variable.
The new approach is much simpler to get right since there is no risk of "forgetting" to propagate
the set_interrupt method to sub-components.

The plan is to support set_interrupt methods and m_interrupted flags only in tactic objects.
We need to support them in tactics and tacticals because we want to implement combinators/tacticals such as (try_for T M) that fails if tactic T does not finish in M ms.
For example, consider the tactic:

    try-for (T1 ORELSE T2) 5

It tries the tactic (T1 ORELSE T2) for 5ms.
Thus, if T1 does not finish after 5ms an interrupt request is sent, and T1 is interrupted.
Now, if you do not have a m_interrupted flag marking each tactic, the ORELSE combinator will try T2.
The set_interrupt method for ORELSE tactical should turn on the m_interrupted flag.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-12 21:45:48 -08:00
..
interval chore(*): add LCOV_EXCL_LINE to lean_unreachable statements 2013-11-11 09:19:38 -08:00
numerics chore(*): add LCOV_EXCL_LINE to lean_unreachable statements 2013-11-11 09:19:38 -08:00
polynomial feat(polynomial): add multivariate polynomials 2013-10-21 18:22:14 -07:00
sexpr chore(*): add LCOV_EXCL_LINE to lean_unreachable statements 2013-11-11 09:19:38 -08:00
ascii.cpp Modify Doxygen file to extract all elements even the undocumented ones. Disable warnings for undocumented entities. Add extra comments. 2013-09-13 13:46:22 -07:00
ascii.h Create pp::unicode option. The idea is to be able to disable unicode characters, but still be able to use mixfix notation. 2013-09-03 10:11:45 -07:00
bit_tricks.cpp Fix bugs in mpbq. 2013-07-21 20:12:04 -07:00
bit_tricks.h Fix bugs in mpbq. 2013-07-21 20:12:04 -07:00
buffer.h chore(emplace_back): use emplace_back when appropriate 2013-11-10 11:14:04 -08:00
CMakeLists.txt feat(util/interrupt): restore interrupt module 2013-11-12 21:16:10 -08:00
debug.cpp Update to suppress unused-parameter warnings 2013-09-19 22:40:34 -07:00
debug.h fix(debug): remove typeid information from assertion, the names are mangled and are not very useful 2013-10-23 16:41:51 -07:00
escaped.cpp Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
escaped.h Improve documentation 2013-07-26 11:43:53 -07:00
exception.cpp fix(lean): fix warnings produced by cppcheck 2013-09-30 21:38:55 -07:00
exception.h test(exception): add new tests exception and parser_exception 2013-09-25 20:57:53 -07:00
flet.h Track recursion depth at normalizer. Add fluid let template. 2013-08-23 09:42:49 -07:00
hash.cpp Remove invalid use of register 2013-09-19 22:59:39 -07:00
hash.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
int64.h feat(numerics): add finite field Z/pZ 2013-10-18 13:27:28 -07:00
interrupt.cpp feat(*): simplify interrupt propagation 2013-11-12 21:45:48 -08:00
interrupt.h feat(*): simplify interrupt propagation 2013-11-12 21:45:48 -08:00
interruptable_ptr.h Add Ctrl-C support for interrupting Lean shell. 2013-08-24 16:11:35 -07:00
lazy_list.h feat(lazy_list): implement ML-like lazy lists 2013-09-29 12:35:26 -07:00
list.h Remove duplicate solutions in the higher order matching module. Simplify solutions when higher-order matching is used, and we don't have a residue. 2013-09-19 18:59:28 -07:00
list_fn.h feat(util/list): add static_asserts for map/for_each/compare 2013-10-01 09:05:53 -07:00
map.h Add helper function for maps. 2013-08-14 18:17:18 -07:00
memory.cpp fix(util/memory): make sure realloc behaves like free when sz == 0 2013-11-11 13:42:22 -08:00
memory.h Track memory usage. Add new CMake option TRACK_MEMORY_USAGE (It is ON by default). 2013-09-20 12:32:12 -07:00
name.cpp feat(make): add THREAD_SAFE build option 2013-10-25 11:50:35 -07:00
name.h perf(name): add quick_cmp for hierarchical names 2013-10-25 09:58:06 -07:00
name_generator.h feat(elaborator): solve unification constraints 2013-10-22 08:15:36 -07:00
name_set.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
output_channel.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
pair.h Add options to customize formatter 2013-08-13 16:19:30 -07:00
pdeque.h chore(*): add LCOV_EXCL_LINE to lean_unreachable statements 2013-11-11 09:19:38 -08:00
pvector.h chore(*): add LCOV_EXCL_LINE to lean_unreachable statements 2013-11-11 09:19:38 -08:00
rc.h feat(make): add THREAD_SAFE build option 2013-10-25 11:50:35 -07:00
safe_arith.cpp Fix cpplint warning in util/safe_arith.cpp 2013-09-16 19:12:12 -07:00
safe_arith.h Simplify how universe variable constraints are represented in the kernel. Allow universe variable to be created without an environment. 2013-08-05 20:06:42 -07:00
scoped_map.h chore(emplace_back): use emplace_back when appropriate 2013-11-10 11:14:04 -08:00
scoped_set.h chore(emplace_back): use emplace_back when appropriate 2013-11-10 11:14:04 -08:00
shared_mutex.cpp fix(lua): make sure environment objects can be safely accessed/updated from current threads 2013-11-11 20:29:53 -08:00
shared_mutex.h fix(lua): make sure environment objects can be safely accessed/updated from current threads 2013-11-11 20:29:53 -08:00
splay_map.h refactor(splay_map): modify splay_find signature 2013-10-25 10:47:15 -07:00
splay_tree.h chore(emplace_back): use emplace_back when appropriate 2013-11-10 11:14:04 -08:00
sstream.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
test.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
timeit.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
trace.cpp Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00
trace.h Use fullpath in #include directives, add missing STL headers 2013-09-13 03:35:29 -07:00