3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-10 19:27:06 +00:00

max maximal unfolding configurable

This commit is contained in:
Nikolaj Bjorner 2022-08-04 16:58:01 +03:00
parent a3161bdc15
commit a8ff976bcc
4 changed files with 5 additions and 2 deletions

View file

@ -105,6 +105,7 @@ def_module_params(module_name='smt',
('core.validate', BOOL, False, '[internal] validate unsat core produced by SMT context. This option is intended for debugging'),
('seq.split_w_len', BOOL, True, 'enable splitting guided by length constraints'),
('seq.validate', BOOL, False, 'enable self-validation of theory axioms created by seq theory'),
('seq.max_unfolding', UINT, 1000000000, 'maximal unfolding depth for checking string equations and regular expressions'),
('str.strong_arrangements', BOOL, True, 'assert equivalences instead of implications when generating string arrangement axioms'),
('str.aggressive_length_testing', BOOL, False, 'prioritize testing concrete length values over generating more options'),
('str.aggressive_value_testing', BOOL, False, 'prioritize testing concrete string constant values over generating more options'),

View file

@ -21,4 +21,5 @@ void theory_seq_params::updt_params(params_ref const & _p) {
smt_params_helper p(_p);
m_split_w_len = p.seq_split_w_len();
m_seq_validate = p.seq_validate();
m_seq_max_unfolding = p.seq_max_unfolding();
}

View file

@ -24,6 +24,7 @@ struct theory_seq_params {
*/
bool m_split_w_len = false;
bool m_seq_validate = false;
unsigned m_seq_max_unfolding = UINT_MAX/4;
theory_seq_params(params_ref const & p = params_ref()) {
updt_params(p);

View file

@ -3276,7 +3276,7 @@ bool theory_seq::should_research(expr_ref_vector & unsat_core) {
}
}
if (k_min < UINT_MAX/4) {
if (k_min < get_fparams().m_seq_max_unfolding) {
m_max_unfolding_depth++;
k_min *= 2;
if (m_util.is_seq(s_min))
@ -3290,7 +3290,7 @@ bool theory_seq::should_research(expr_ref_vector & unsat_core) {
IF_VERBOSE(1, verbose_stream() << "(smt.seq :increase-depth " << m_max_unfolding_depth << ")\n");
return true;
}
else if (k_min != UINT_MAX && k_min >= UINT_MAX/4) {
else if (k_min != UINT_MAX && k_min >= get_fparams().m_seq_max_unfolding) {
throw default_exception("reached max unfolding");
}