Leonardo de Moura
db36d465dc
chore(util/sexpr): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-06 18:01:43 -07:00
Leonardo de Moura
a9a38675cb
feat(util/lua): add helper functions for checking expected number of arguments in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-03 10:16:27 -07:00
Leonardo de Moura
a5229e5283
chore(util/lua): name convention
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-01 18:40:18 -07:00
Leonardo de Moura
097f562016
refactor(*): add pushinteger and pushnumeral inline functions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-29 14:47:08 -07:00
Leonardo de Moura
412a3797f4
refactor(*): add pushboolean inline function, and replace lua_pushboolean with it
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-04-29 14:37:16 -07:00
Leonardo de Moura
4d25cb7f47
feat(library/tactic): add simplify_tactic based on the simplifier
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-26 18:53:18 -08:00
Leonardo de Moura
a339a53f50
feat(util/options): 'verbose' as a system option, add -q (quiet) option
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-09 15:31:58 -08:00
Leonardo de Moura
3e18cdfeec
feat(util/format): do not use colors by default
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-09 11:56:58 -08:00
Leonardo de Moura
1f6e959139
feat(deserializer): protect against corrupted binary files
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-30 18:05:38 -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
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
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
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
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
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
f80106a895
chore(*): use 'explicit operator bool' everywhere.
...
operator bool() may produce unwanted conversions.
For example, we had the following bug in the code base.
...
object const & obj = find_object(const_name(n));
if (obj && obj.is_builtin() && obj.get_name() == n)
...
obj.get_name() has type lean::name
n has type lean::expr
Both have 'operator bool()', then the compiler uses the operator to
convert them to Boolean, and then compare the result.
Of course, this is not our intention.
After this commit, the compiler correctly signs the error.
The correct code is
...
object const & obj = find_object(const_name(n));
if (obj && obj.is_builtin() && obj.get_name() == const_name(n))
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-12-02 23:02:45 -08:00
Leonardo de Moura
6cb8300076
doc(lua): add S-expression documentation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-28 10:33:32 -08:00
Leonardo de Moura
f7e8545e97
refactor(frontends/lua): rename leanlua_state to script_state, and move it to util
...
This commit also minimizes the dependencies of script_state.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-27 14:57:36 -08:00
Leonardo de Moura
a6f6f49b5f
refactor(frontends/lua): add lua_migrate_fn, and make copy_values modular
...
copy_values is not a big if-then-else anymore.
Before this change, whenever we added a new kind of userdata, we would have to update copy_values.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-27 10:32:19 -08:00
Leonardo de Moura
956f203a55
refactor(bindings/lua): move Lua bindings to the file associated with them
...
The directory bindings/lua was getting too big and had too many dependencies.
Moreover, it was getting too painful to edit/maintain two different places.
Now, the bindings for module X are in the directory that defines X.
For example, the bindings for util/name.cpp are located at util/name.cpp.
The only exception is the kernel. We do not want to inflate the kernel
with Lua bindings. The bindings for the kernel classes are located
at bindings/kernel_bindings.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-26 19:15:56 -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
e2efce6b62
style(util/sexpr): name convetion for enumeration types
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-13 11:50:12 -08:00
Leonardo de Moura
31abc00db8
chore(*): add LCOV_EXCL_LINE to lean_unreachable statements
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-11 09:19:38 -08:00
Leonardo de Moura
dc0e7a4472
feat(pos_info_provider): add position information provider for expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-10-22 08:15:36 -07:00
Leonardo de Moura
15979ab991
fix(lean): fix warnings produced by cppcheck
...
Fix (relevant) warnings produced by http://cppcheck.sourceforge.net .
Most warnings produced were incorrect. The tool does not seem to support some of the C++11 new features.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-30 21:38:55 -07:00
Leonardo de Moura
6477708d78
refactor(debug): improve lean_unreachable(), now we can avoid 'fake' return statements
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-25 21:27:20 -07:00
Soonho Kong
0ef633a3c5
Fix to be compiled by clang++-3.4
...
Clang++-3.4 is starting to enforce the following item of C++11 standard,
thus it's making lean not compiling:
It's illegal in C++11: §8.3.6.4 [dcl.fct.default]
"If a friend declaration specifies a default argument expression, that
declaration shall be a definition and shall be the only declaration of
the function or function template in the translation unit."
2013-09-24 21:30:56 -07:00
Soonho Kong
49e87ccbb1
Enable "-Wextra" compiler option and fix code to remove warnings
...
"-Wextra" option turns on the following warnings:
-Wclobbered
-Wempty-body
-Wignored-qualifiers
-Wmissing-field-initializers
-Wmissing-parameter-type (C only)
-Wold-style-declaration (C only)
-Woverride-init
-Wsign-compare
-Wtype-limits
-Wuninitialized
-Wunused-parameter (only with -Wunused or -Wall)
-Wunused-but-set-parameter (only with -Wunused or -Wall)
2013-09-19 22:52:52 -07:00
Leonardo de Moura
63e102055e
Move metavariables to the kernel. This is the first step for implementing the new elaborator.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-15 12:09:01 -07:00
Soonho Kong
bc60b47295
Apply coding style
2013-09-13 18:48:09 -07:00
Leonardo de Moura
bcc3827a99
Modify Doxygen file to extract all elements even the undocumented ones. Disable warnings for undocumented entities. Add extra comments.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 13:46:22 -07:00
Leonardo de Moura
8c735f1daa
Use consistent coding style for spaces after ','
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-13 12:49:03 -07:00
Soonho Kong
5c3866cd71
Use fullpath in #include directives, add missing STL headers
2013-09-13 03:35:29 -07:00
Leonardo de Moura
26097475fd
Use fullpath in #include directives.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 20:04:10 -07:00
Leonardo de Moura
c655e9fe7b
Move sexpr_funcs to sexpr_fn. Using consistent file name conventions.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-12 18:27:46 -07:00
Leonardo de Moura
87d3961158
Improve elaborator error messages
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-04 16:36:58 -07:00
Leonardo de Moura
887f696f66
Factor duplicate code. Add more comments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 23:27:58 -07:00
Leonardo de Moura
544229e5d3
Create pp::unicode option. The idea is to be able to disable unicode characters, but still be able to use mixfix notation.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-09-03 10:11:45 -07:00
Leonardo de Moura
fc6cc17925
Improve lean pretty printer support for implicit argument annotations
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-26 19:19:56 -07:00
Leonardo de Moura
1b5fcb80ee
Add sexpr tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-22 08:30:52 -07:00
Leonardo de Moura
6272408f12
Add format tests
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-22 08:20:42 -07:00
Leonardo de Moura
3c5f993191
Fix bugs in options module. Add more tests.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-22 08:08:55 -07:00
Leonardo de Moura
eb4315baab
Add small trick to improve pretty printer performance. Now, deep.lean takes 0.140secs to be processed.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 22:54:58 -07:00
Leonardo de Moura
56d2d2a112
Improve pretty printer performance for deep formulas and formats with long lines. Add example that demonstrates performance problem (before: 13 secs, after: 1 sec).
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 22:45:48 -07:00
Leonardo de Moura
31460aa5b8
Add option declarations. Add Help.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 17:02:09 -07:00
Leonardo de Moura
ce470f57db
Add set options to lean_parser. Add support for disabling unicode output. Use channels in lean_parser.
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-21 12:42:55 -07:00
Leonardo de Moura
6f36611010
Fix clang++ error
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-08-20 20:16:02 -07:00