Leonardo de Moura
1ab12eb105
refactor(util/splay_map): remove unnecessary operation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:56 -07:00
Leonardo de Moura
528ea367ad
feat(util): add red-black trees
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:56 -07:00
Leonardo de Moura
2a73389ed3
refactor(kernel): justification objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:56 -07:00
Leonardo de Moura
50300126a5
refactor(util/name_generator): make sure there is no risk of overflow, name generators will be extensively used in version 0.2
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:56 -07:00
Leonardo de Moura
3c8ccdd33d
test(util/exception): experiment with exceptions with nested std::function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
84e211b81b
fix(frontends/lean): missing ':' in error messages
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-09 11:19:58 -08:00
Leonardo de Moura
f7c7dd4ed4
feat(frontends/lean): include filename in error messages, use GNU error message style
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-09 11:01:27 -08:00
Leonardo de Moura
3715b10ce7
feat(util/sexpr/options): serialization for options
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 20:40:00 -08:00
Leonardo de Moura
dbebb4a4a1
feat(util/sexpr): serialization for sexpr
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 20:19:56 -08:00
Leonardo de Moura
9c6dc5d230
feat(util/serializer): add hackish write_double/read_double
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 19:46:45 -08:00
Leonardo de Moura
abc370a011
feat(util/numerics): serialization for mpz and mpq
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:32:01 -08:00
Leonardo de Moura
49df0c435d
feat(util/serializer): make sure the read/write is portable
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 18:07:19 -08:00
Leonardo de Moura
d05695c331
feat(util/name): serialization for hierarchical names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 17:47:20 -08:00
Leonardo de Moura
b72937c02c
feat(util/serializer): simple serialization infrastructure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 16:50:06 -08:00
Leonardo de Moura
daef2b7b24
feat(util/sexpr/options): add is_eqp predicate for options
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-20 10:53:53 -08:00
Leonardo de Moura
2253d8079b
chore(util/pdeque): remove unused template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-14 23:31:44 -08:00
Leonardo de Moura
5aa9264091
feat(util/list): add remove_last template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-14 23:08:10 -08:00
Leonardo de Moura
1b1032eb99
feat(util/list): improved filter that reuses list cells
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-14 20:15:37 -08:00
Leonardo de Moura
450d6a4b1e
refactor(util/splay_tree): replace find with splay_find
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-12 17:27:30 -08:00
Leonardo de Moura
cdec9762ce
chore(util/pvector): remove unused template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-10 20:32:10 -08: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
Soonho Kong
4de3b772fd
feat(util/stackinfo): implement get_stack_size (Mac OSX version)
2013-12-01 22:24:12 -05: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
737e634556
fix(util/list): bug in map template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-01 08:51:24 -08:00
Leonardo de Moura
7ff791eb9f
feat(util/name_set): add mk_unique (with respect to a name_set)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-30 11:28:38 -08:00
Leonardo de Moura
6da13cc245
feat(util/list): map_append template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-30 11:28:38 -08:00
Leonardo de Moura
fe79bbf2b7
feat(util/list): filter template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-30 11:28:38 -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
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
bcd88cac08
style(util): missing includes
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 17:05:46 -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
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
9eb6da2a31
feat(util): add optional template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-23 13:27:22 -08:00
Leonardo de Moura
a776c8b158
feat(util/interrupt): add sleep_for, and simplify request_interrupt
...
The Lean sleep_for checks the interrupt flag from time to time.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-22 11:32:12 -08:00
Leonardo de Moura
935349ec91
fix(tests/util/thread): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-22 10:23:20 -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
Leonardo de Moura
8515821d56
feat(util/list): add map_filter template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-21 17:29:06 -08:00
Leonardo de Moura
87eb254a1a
fix(tests/util/thread): incorrect unit test
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-20 11:28:19 -08:00
Leonardo de Moura
eba31a0516
test(util/interval): add more tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 19:07:09 -08:00
Leonardo de Moura
a98fdd9be6
refactor(shell): combine lean and leanlua executables in a single executable
...
The main motivation is to allow users to configure/extend Lean using .lua files before loading the actual .lean files.
Example:
./lean extension1.lua extension2.lua file.lean
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 16:48:21 -08:00
Leonardo de Moura
2265ef78c4
feat(util/list): add emplace_front
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-19 16:27:31 -08:00
Leonardo de Moura
e10d17a0f4
feat(util/sexpr): avoid recursion when destructing sexpr's
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-18 17:46:53 -08:00
Leonardo de Moura
76252816ac
perf(util/list): avoid recursion in map and destructor
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-18 16:47:52 -08:00
Leonardo de Moura
d67bf995ed
feat(util/list): avoid recursion at for_each template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-18 15:52:31 -08:00
Leonardo de Moura
adf4856f88
feat(util/list): add map_reuse template
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-18 15:32:02 -08:00
Leonardo de Moura
53dc8c8c57
test(util/shared_mutex): add missing tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-18 14:03:18 -08:00