3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 01:35:47 +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

36
src/util/env_params.cpp Normal file
View file

@ -0,0 +1,36 @@
/*++
Copyright (c) 2011 Microsoft Corporation
Module Name:
env_params.cpp
Abstract:
Goodies for updating environment parameters.
Author:
Leonardo (leonardo) 2012-12-01
Notes:
--*/
#include"env_params.h"
#include"params.h"
#include"gparams.h"
#include"util.h"
#include"memory_manager.h"
void env_params::updt_params() {
params_ref p = gparams::get();
set_verbosity_level(p.get_uint("verbose", 0));
enable_warning_messages(p.get_bool("warning", true));
memory::set_max_size(p.get_uint("memory_max_size", 0));
}
void env_params::collect_param_descrs(param_descrs & d) {
d.insert("verbose", CPK_UINT, "be verbose, where the value is the verbosity level", "0");
d.insert("warning", CPK_BOOL, "enable/disable warning messages", "true");
d.insert("memory_max_size", CPK_UINT, "set hard upper limit for memory consumption (in megabytes), if 0 then there is no bound.", "0");
}