3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-13 12:28:44 +00:00

Expose rcf module parameters

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2013-01-12 16:40:45 -08:00
parent e6a35c6241
commit ea9421bb38
2 changed files with 15 additions and 6 deletions

View file

@ -0,0 +1,7 @@
def_module_params('rcf',
description='real closed fields',
export=True,
params=(('use_prem', BOOL, True, "use pseudo-remainder instead of remainder when computing GCDs and Sturm-Tarski sequences"),
('initial_precision', UINT, 24, "a value k that is the initial interval size (as 1/2^k) when creating transcendentals and approximated division"),
('inf_precision', UINT, 24, "a value k that is the initial interval size (i.e., (0, 1/2^l)) used as an approximation for infinitesimal values"),
('max_precision', UINT, 64, "during sign determination we switch from interval arithmetic to complete methods when the interval size is less than 1/2^k, where k is the max_precision")))

View file

@ -20,6 +20,7 @@ Notes:
--*/
#include"realclosure.h"
#include"rcf_params.hpp"
#include"array.h"
#include"mpbq.h"
#include"mpz_matrix.h"
@ -676,11 +677,12 @@ namespace realclosure {
m_cancel = f;
}
void updt_params(params_ref const & p) {
m_use_prem = p.get_bool("use_prem", true);
m_ini_precision = p.get_uint("initial_precision", 24);
m_inf_precision = p.get_uint("inf_precision", 24);
m_max_precision = p.get_uint("max_precision", 64); // == 1/2^64 for interval arithmetic methods, it switches to complete methods after that.
void updt_params(params_ref const & _p) {
rcf_params p(_p);
m_use_prem = p.use_prem();
m_ini_precision = p.initial_precision();
m_inf_precision = p.inf_precision();
m_max_precision = p.max_precision();
bqm().power(mpbq(2), m_inf_precision, m_plus_inf_approx);
bqm().set(m_minus_inf_approx, m_plus_inf_approx);
bqm().neg(m_minus_inf_approx);
@ -5316,7 +5318,7 @@ namespace realclosure {
}
void manager::get_param_descrs(param_descrs & r) {
// TODO
rcf_params::collect_param_descrs(r);
}
void manager::set_cancel(bool f) {