Commit graph

1044 commits

Author SHA1 Message Date
Leonardo de Moura
6c7be28807 test(lua): add tests for options object
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-11 09:42:50 -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
dbdb9a41af style(lua): use C++-style cast
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
7683188ab0 chore(emplace_back): use emplace_back when appropriate
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
8c140ff86f feat(lua): allow lua scripts (embedded in Lean files) to access the environment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
3078923ea4 fix(kernel/type_checker): add missing test, and kernel_exception has_no_type_exception
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
9d61fcf85b feat(lua): expose environment objects in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
119e0ba5e6 feat(lua): add to_nonnull_expr
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Leonardo de Moura
8dd62e76be feat(lua): add mk_metavar to Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-10 11:14:04 -08:00
Soonho Kong
46edc11fd8 doc(README.md): add coveralls.io's coverage badge 2013-11-10 02:11:50 -05:00
Soonho Kong
b1916721f2 chore(travis): update coveralls.io repo token 2013-11-10 02:04:27 -05:00
Soonho Kong
27710a778a chore(travis): use gcov-4.8 on ubuntu 2013-11-10 01:52:47 -05:00
Soonho Kong
7831b534ba chore(travis): fix lcov permission problem 2013-11-10 01:44:50 -05:00
Soonho Kong
6a2dfe7765 chore(travis): add coveralls.io support 2013-11-10 00:52:32 -05:00
Soonho Kong
1cf037f11e chore(cmake): do not delete coverage.info.cleaned which will be used for coveralls.io 2013-11-09 22:19:08 -05:00
Leonardo de Moura
6b71fb346c fix(lua): add missing files for local_context
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-09 12:47:52 -08:00
Leonardo de Moura
554defe89d feat(lua): expose local_context objects in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-09 12:18:46 -08:00
Leonardo de Moura
183080294b fix(cmake/Modules/CheckLuaNewstate.cc): compilation problem on cygwin
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-09 12:18:20 -08:00
Leonardo de Moura
ad2de3b53c feat(lua): expose level objects in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 17:08:24 -08:00
Leonardo de Moura
5a97f730af feat(lua): add Type function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 15:52:58 -08:00
Leonardo de Moura
32605d8266 feat(lua): expose level objects in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 15:38:00 -08:00
Soonho Kong
d4dbc18404 chore(cmake/Modules/FindLua): disable TRY_RUN in cross-compilation. 2013-11-08 18:04:55 -05:00
Leonardo de Moura
bbab454b6c fix(lua): cpplint.py does not like multiline strings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 13:27:20 -08:00
Leonardo de Moura
ec56ba72ea fix(lua): cygwing compilation problem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 13:27:20 -08:00
Soonho Kong
7b6ed458e1 doc(README): bump cross-compiler version to 4.8.2
[skip ci]
2013-11-08 16:09:37 -05:00
Soonho Kong
d1f3ff8a26 chore(build): add Lua to OSX build 2013-11-08 16:04:33 -05:00
Leonardo de Moura
cc17be1ef1 feat(lua): add is_* predicates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 12:40:28 -08:00
Leonardo de Moura
5c35a9ad0a feat(lua): add Consts function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 12:09:46 -08:00
Leonardo de Moura
b7d8391306 refactor(lua): remove duplicate code, separate lua_exception, add missing #pragma once
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 11:59:47 -08:00
Leonardo de Moura
c8b0c10c88 refactor(lua): make Lua a required (non-optional) package
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 10:56:29 -08:00
Leonardo de Moura
4eadd0b7d8 doc(README): add lua
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 10:43:52 -08:00
Leonardo de Moura
c5207489fd fix(memory): realloc must behave like malloc when ptr is nullptr
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 10:31:57 -08:00
Leonardo de Moura
a10aa0880f fix(build): add CheckLuaObjlen.cc test, not every Lua version has the function lua_objlen
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-08 08:26:04 -08:00
Leonardo de Moura
b57ad80d5e feat(lua): expose basic API for Lean expressions in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:54:57 -08:00
Leonardo de Moura
fb09fc9fe6 feat(lua): add set_global_function template, and to_name_ext function
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:54:57 -08:00
Leonardo de Moura
db8b16641c chore(build): check if the Lua installed in the system supports lua_newstate
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:54:57 -08:00
Leonardo de Moura
9000c7c2fa feat(lua): expose format objects in the Lua bindings
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 21:54:42 -08:00
Leonardo de Moura
6f432b4094 feat(lua): make Lua use our malloc/realloc, catch error when initializing Lua
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 15:52:39 -08:00
Leonardo de Moura
30d54fa483 chore(todo): update todo list 2013-11-07 15:25:03 -08:00
Leonardo de Moura
a16c41c2c7 chore(todo): update todo list 2013-11-07 15:24:41 -08:00
Leonardo de Moura
9c18439eb2 chore(todo): update todo list 2013-11-07 15:24:09 -08:00
Leonardo de Moura
57b9657bf0 feat(lua): add lua_exception for wrapping lua errors, and improve Lua error messages in the Lean frontend
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 15:19:26 -08:00
Leonardo de Moura
a9b2be0b9c feat(frontends/lean): add support for embedded Lua scripts in Lean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 13:56:04 -08:00
Leonardo de Moura
ff16ffaea3 fix(kernel/environment): warning produced by clang
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 11:36:08 -08:00
Leonardo de Moura
8012c4f644 fix(kernel/environment): add weak reference to environment objects
We need weak references to environment objects because the environment has a reference to the type_checker and the type_checker has a reference back to the environment. Before, we were breaking the cycle using an "environment const &". This was a dangerous hack because the environment smart pointer passed to the type_checker could be on the stack. The weak_ref is much safer.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 11:29:08 -08:00
Leonardo de Moura
9c60eed93c refactor(kernel/metavar): avoid using unique names for default metavariable prefix
The problem is that unique names depend on the order compilation units are initialized. The order of initialization is not specified by the C++ standard. Then, different compilers (or even the same compiler) may produce different initialization orders, and consequently the metavariable prefix is going to be different for different builds. This is not a bug, but it makes unit tests to fail since the output produced by different builds is different for the same input file.
Avoiding unique name feature in the default metavariable prefix avoids this problem.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 10:16:25 -08:00
Leonardo de Moura
2141ee12f4 refactor(frontends/lean): use extension objects to store lean default frontend data in the environment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-07 10:00:12 -08:00
Leonardo de Moura
80e23f98c7 feat(kernel/environment): add environment extension objects, the environment can be extended with frontend specific objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-06 19:22:30 -08:00
Soonho Kong
6cb282d70b chore(travis): split a memcheck build into two builds using range option (-I) 2013-11-06 13:49:14 -05:00
Soonho Kong
c7c0905c4f chore(travis): use cmake-2.8.7 for windows build 2013-11-06 13:49:14 -05:00