Leonardo de Moura
44a31dd8fb
feat(frontends/lean/parser): improve Import command
...
- The extension does not have to be provided.
- It can also import Lua files.
- Hierachical names can be used instead of strings.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-28 12:05:01 -08:00
Leonardo de Moura
b94503ab20
chore(util/sexpr): remove unnecessary decls
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 23:24:31 -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
cbe0b8532a
feat(util/serializer): add write_char and read_char
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 17:22:15 -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
8b6421e4de
feat(util/extensible_object): add template for creating 'extensible' objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-27 15:40:21 -08:00
Leonardo de Moura
71a0f83143
feat(util/sexpr/format): turn off colors on Windows
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-26 09:54:29 -08:00
Leonardo de Moura
a9712b91a8
feat(util/lean_path): include ../library in the default LEAN_PATH
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-25 16:18:27 -08:00
Leonardo de Moura
afd10d62ca
feat(util/list): improve to_list function, it takes an optional tail
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-24 20:56:34 -08:00
Soonho Kong
de018220e1
feat(*): use std::make_shared to create shared_ptr
2013-12-24 14:32:50 -05:00
Leonardo de Moura
bcb41cd938
fix(util/lean_path): warnings produced by Valgrind
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-23 10:02:48 -08:00
Leonardo de Moura
b5d23619cb
feat(util/script_state): add 'import' command to Lua, it import files from the LEAN_PATH
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 21:27:12 -08:00
Leonardo de Moura
e5f53595b6
fix(util/lean_path): bug at init_lean_path (it was missing last path), and add normalization function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 19:38:32 -08:00
Leonardo de Moura
50de85ee29
fix(util/lean_path): get_exe_location for Windows
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 19:13:41 -08:00
Leonardo de Moura
cc9e16c3fc
feat(util/lean_path): add function for searching for a file in the LEAN_PATH
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 18:47:49 -08:00
Leonardo de Moura
777582380f
feat(util/lean_path): add support for LEAN_PATH
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 17:56:53 -08:00
Leonardo de Moura
df1b21a03d
feat(util/exe_location): add function for finding the location of the executable
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-22 17:12:31 -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
47c7bb1bde
refactor(*): uses aliases for unordered_map and unordered_set
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-18 12:30:45 -08:00
Leonardo de Moura
1e4fa76a47
feat(util/name_map): add template alias
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-18 11:34:40 -08:00
Leonardo de Moura
af42078205
fix(kernel): incorrect use of scoped_map
...
This commit also adds a new test that exposes the problem.
The scoped_map should not be used for caching values in the normalizer and type_checker. When we extend the context, the meaning of all variables is modified (we are essentially performing a lift). So, the values stored in the cache are not correct in the new context.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-16 15:11:39 -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
2e5e5e187f
chore(util/rc): remove unnecessary argument from LEAN_COPY_REF and LEAN_MOVE_REF macros
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-13 15:01:24 -08:00
Leonardo de Moura
3416df85f8
fix(util/thread): warning 'thread.cpp.o has no symbols'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-13 14:00:40 -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
7d184c3c4b
fix(util/shared_mutex) missing pragma
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-12 16:48:34 -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
7ab321f568
chore(util): remove dead file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 22:32:11 -08:00
Leonardo de Moura
0cd8e3e76b
feat(split-stack): add support for split-stacks (no more stackoverflows)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 22:30:54 -08:00
Leonardo de Moura
fd2a04e9ac
fix(util/stackinfo): bug on Fedora
...
Signed-off-by: Leonardo de Moura <leonardo@nod1-2008.corp.crtest.com>
2013-12-09 18:44:14 -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
533ed51f51
feat(util/shared_mutex): skip shared_mutex implementation if LEAN_MULTI_THREAD is not defined
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-09 15:42:08 -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
0d10cba4a0
refactor(util/sexpr/format): minimize the use of recursion, combine be and layout into a single procedure (without creating a temporary potentially big sexpr)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-08 21:06:24 -08:00
Leonardo de Moura
25b812f1c9
feat(kernel/expr): no overhead optional<expr> template specialization
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-08 10:17:29 -08:00
Leonardo de Moura
3e1fd06903
refactor(kernel/expr): remove 'null' expression, and operator bool for expression
...
After this commit, a value of type 'expr' cannot be a reference to nullptr.
This commit also fixes several bugs due to the use of 'null' expressions.
TODO: do the same for kernel objects, sexprs, etc.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-07 23:21:10 -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
d949dfd46d
fix(util/stackinfo): compilation warning on cygwin/mingw
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 11:32:39 -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
1a02abf7b2
feat(util/script_state): add a lua hook function that checks for the interrupt flag
...
This is a very convenient feature for interrupting non-terminating user scripts.
Before this commit, the user had to manually invoke check_interrupt() in potentially expensive loops. Now, this is not needed anymore.
Remark: we still have to check whether this trick works with LuaJIT or not.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 09:57:36 -08:00
Leonardo de Moura
ef6a27fe84
feat(util/script_state): add join method to Lua threads
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 09:15:09 -08:00
Leonardo de Moura
def186a9cd
fix(util/stackinfo): try to fix incorrect main thread stack size on OSX
...
This fix tries to fix two failures on our unit tests.
tests/kernel/normalizer
tests/kernel/type_checker
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 08:56:46 -08:00
Leonardo de Moura
fd9781d58d
fix(util/stackinfo): compilation warning on mingw and cygwin
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-04 08:26:50 -08:00