Mirror of https://github.com/leanprover/lean2 in case it ever disappears
d87ad9eb7e
The following call sequence is possible: C++ -> Lua -> C++ -> Lua -> C++ The first block of C++ is the Lean main function. The main function invokes the Lua interpreter. The Lua interpreter invokes a C++ Lean API. Then the Lean API invokes a callback implemented in Lua. The Lua callback invokes another Lean API. Now, suppose the Lean API throws an exception. We want the C++ exception to propagate over the mixed C++/Lua call stack. We use the clone/rethrow exception idiom to achieve this goal. Before this commit, the C++ exceptions were converted into strings using the method what(), and then they were propagated over the Lua stack using lua_error. A lua_error was then converted into a lua_exception when going back to C++. This solution was very unsatisfactory, since all C++ exceptions were being converted into a lua_exception, and consequently the structure of the exception was being lost. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com> |
||
---|---|---|
doc | ||
examples/lean | ||
script | ||
src | ||
tests | ||
.gitignore | ||
.travis.osx.yml | ||
.travis.windows.yml | ||
.travis.yml | ||
LICENSE | ||
README.md |
Ubuntu | OS X | Windows | Coverage | Builds / UnitTests / Dynamic Analyses |
---|---|---|---|---|
http://build.leanprover.net |
About
Requirements
- C++11 compatible compiler: g++ (version >= 4.8.1), or clang++ (version >= 3.3)
- CMake
- GMP (GNU multiprecision library)
- MPFR (GNU MPFR Library)
- Lua 5.2 or 5.1, or LuaJIT 2.0
- (optional) gperftools
Installing required packages at
Build Instructions
Miscellaneous
- Testing and Code Coverage
- Building Doxygen Documentation:
doxygen src/Doxyfile
- Coding style
- Git Commit Convention
- Automatic builds