Commit graph

16 commits

Author SHA1 Message Date
Leonardo de Moura
b482f27543 fix(util/lazy_list): bug in filter operation 2014-09-12 16:12:23 -07:00
Leonardo de Moura
db0ef64c04 feat(util/lazy_list_fn): handle the 'is_nil' case more efficiently
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-03 11:29:04 -07:00
Leonardo de Moura
360e9b9486 feat(library/tactic): add apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 18:33:53 -07:00
Leonardo de Moura
e7ae749221 feat(boost): implement multi-threading support using Boost
To use Boost instead of the standard library, we must use the cmake option
    -D BOOST=ON

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 17:24:32 -08:00
Leonardo de Moura
8f2fe273ea refactor(*): isolate std::thread dependency
This commit allows us to build Lean without the pthread dependency.
It is also useful if we want to implement multi-threading on top of Boost.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 15:20:26 -08:00
Leonardo de Moura
e2999d3ff6 feat(*): add component name to check_stack and check_system
I also reduced the stack size to 8 Mb in the tests at tests/lean and tests/lean/slow. The idea is to simulate stackoverflow conditions.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-07 15:11:55 -08:00
Leonardo de Moura
fa35fd6989 chore(*): make sure LEAN_THREAD_UNSAFE build flag is handled correctly
When LEAN_THREAD_UNSAFE=ON, we:

- Do not run tests at tests/lua/threads
- Disable thread object at Lua API
- par tactical becomes an alias for interleave
- Disable some unit tests that use threads

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 10:27:22 -08:00
Leonardo de Moura
74dfdd02de feat(util): add primitives for checking the amount of available stack space
Recursive functions that may go very deep should invoke the function check_stack. It throws an exception if the amount of stack space is limited.

The function check_system() is syntax sugar for
    check_interrupted();
    check_stack();

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-01 17:19:27 -08:00
Leonardo de Moura
8e87ef5da8 feat(util/lazy_list): add repeat and repeat_at_most templates for lazy_lists
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-24 11:16:37 -08:00
Leonardo de Moura
b74aeb1216 fix(util/lazy_list): par template missing case
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-24 00:38:31 -08:00
Leonardo de Moura
40a2f0a588 refactor(util/lazy_list): polish lazy_list API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 17:45:01 -08:00
Leonardo de Moura
924187b055 feat(util/lazy_list): add par template for lazy lists)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 16:51:17 -08:00
Leonardo de Moura
157a2b36db feat(lazy_list): add timeout template for lazy_lists
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 16:27:36 -08:00
Leonardo de Moura
cb3c685fb1 feat(util/lazy_list): check for interruption between pulls
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 15:54:32 -08:00
Leonardo de Moura
f19944cf09 refactor(util/lazy_list): 'lazier' lazy_lists
In the new implementation, even the head of the lazy list is computed on demand.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 15:33:30 -08:00
Leonardo de Moura
1f225d2752 feat(util/lazy_list): add useful lazy_list function templates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-22 09:40:56 -08:00