3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-12 10:14:42 +00:00

env params

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-12-01 20:56:40 -08:00
parent 9bd4fd969a
commit 02e763bb6b
15 changed files with 133 additions and 80 deletions

View file

@ -18,6 +18,7 @@ Notes:
--*/
#include"gparams.h"
#include"dictionary.h"
#include"trace.h"
extern void gparams_register_modules();
@ -291,6 +292,7 @@ public:
params_ref get() {
params_ref result;
TRACE("gparams", tout << "get() m_params: " << m_params << "\n";);
#pragma omp critical (gparams)
{
result = m_params;
@ -303,6 +305,7 @@ public:
gparams::imp * gparams::g_imp = 0;
void gparams::set(char const * name, char const * value) {
TRACE("gparams", tout << "setting [" << name << "] <- '" << value << "'\n";);
SASSERT(g_imp != 0);
g_imp->set(name, value);
}
@ -342,6 +345,7 @@ params_ref gparams::get_module(symbol const & module_name) {
}
params_ref gparams::get() {
TRACE("gparams", tout << "gparams::get()\n";);
SASSERT(g_imp != 0);
return g_imp->get();
}
@ -352,11 +356,13 @@ void gparams::display(std::ostream & out, unsigned indent, bool smt2_style) {
}
void gparams::init() {
TRACE("gparams", tout << "gparams::init()\n";);
g_imp = alloc(imp);
gparams_register_modules();
}
void gparams::finalize() {
TRACE("gparams", tout << "gparams::finalize()\n";);
if (g_imp != 0) {
dealloc(g_imp);
g_imp = 0;