Allow loading Z3 dynamically at runtime.

This commit is contained in:
Daniel Kirchner
2020-12-10 16:47:47 +01:00
parent fe79a27a0a
commit 7308abc084
16 changed files with 298 additions and 15 deletions
+12 -1
View File
@@ -21,12 +21,23 @@
#include <libsolutil/CommonData.h>
#include <libsolutil/CommonIO.h>
#include <z3_api.h>
#ifdef HAVE_Z3_DLOPEN
#include <libsmtutil/Z3Loader.h>
#endif
using namespace std;
using namespace solidity::smtutil;
using namespace solidity::util;
bool Z3Interface::available()
{
#ifdef HAVE_Z3_DLOPEN
return Z3Loader::get().available();
#else
return true;
#endif
}
Z3Interface::Z3Interface(std::optional<unsigned> _queryTimeout):
SolverInterface(_queryTimeout),
m_solver(m_context)