mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 13:28:47 +00:00
ensure that solver objects have timeout/rlimit/ctrl-c exposed as possible parameters
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
a686aa7f56
commit
e954f59052
|
@ -166,8 +166,8 @@ void context_params::updt_params(params_ref const & p) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void context_params::collect_param_descrs(param_descrs & d) {
|
void context_params::collect_param_descrs(param_descrs & d) {
|
||||||
d.insert("timeout", CPK_UINT, "default timeout (in milliseconds) used for solvers", "4294967295");
|
insert_rlimit(d);
|
||||||
d.insert("rlimit", CPK_UINT, "default resource limit used for solvers. Unrestricted when set to 0.", "0");
|
insert_timeout(d);
|
||||||
d.insert("well_sorted_check", CPK_BOOL, "type checker", "false");
|
d.insert("well_sorted_check", CPK_BOOL, "type checker", "false");
|
||||||
d.insert("type_check", CPK_BOOL, "type checker (alias for well_sorted_check)", "true");
|
d.insert("type_check", CPK_BOOL, "type checker (alias for well_sorted_check)", "true");
|
||||||
d.insert("auto_config", CPK_BOOL, "use heuristics to automatically select solver and configure it", "true");
|
d.insert("auto_config", CPK_BOOL, "use heuristics to automatically select solver and configure it", "true");
|
||||||
|
|
|
@ -217,8 +217,17 @@ void solver::assert_expr(expr* f, expr* t) {
|
||||||
assert_expr_core2(fml, a);
|
assert_expr_core2(fml, a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void insert_ctrl_c(param_descrs & r) {
|
||||||
|
r.insert("ctrl_c", CPK_BOOL, "enable interrupts from ctrl-c", "false");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void solver::collect_param_descrs(param_descrs & r) {
|
void solver::collect_param_descrs(param_descrs & r) {
|
||||||
r.insert("solver.enforce_model_conversion", CPK_BOOL, "(default: false) enforce model conversion when asserting formulas");
|
r.insert("solver.enforce_model_conversion", CPK_BOOL, "(default: false) enforce model conversion when asserting formulas");
|
||||||
|
insert_timeout(r);
|
||||||
|
insert_rlimit(r);
|
||||||
|
insert_max_memory(r);
|
||||||
|
insert_ctrl_c(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void solver::reset_params(params_ref const & p) {
|
void solver::reset_params(params_ref const & p) {
|
||||||
|
|
|
@ -298,9 +298,14 @@ void insert_produce_proofs(param_descrs & r) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void insert_timeout(param_descrs & r) {
|
void insert_timeout(param_descrs & r) {
|
||||||
r.insert("timeout", CPK_UINT, "(default: infty) timeout in milliseconds.");
|
r.insert("timeout", CPK_UINT, "(default: infty) timeout in milliseconds.", "4294967295");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void insert_rlimit(param_descrs & r) {
|
||||||
|
r.insert("rlimit", CPK_UINT, "default resource limit used for solvers. Unrestricted when set to 0.", "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class params {
|
class params {
|
||||||
friend class params_ref;
|
friend class params_ref;
|
||||||
struct value {
|
struct value {
|
||||||
|
|
|
@ -139,5 +139,6 @@ void insert_max_steps(param_descrs & r);
|
||||||
void insert_produce_models(param_descrs & r);
|
void insert_produce_models(param_descrs & r);
|
||||||
void insert_produce_proofs(param_descrs & r);
|
void insert_produce_proofs(param_descrs & r);
|
||||||
void insert_timeout(param_descrs & r);
|
void insert_timeout(param_descrs & r);
|
||||||
|
void insert_rlimit(param_descrs & r);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue