3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-23 17:10:33 +00:00

Added classical regex factorization

This commit is contained in:
CEisenhofer 2026-04-02 20:03:22 +02:00
parent 3ca960d679
commit a81ce477f5
8 changed files with 258 additions and 6 deletions

View file

@ -57,6 +57,7 @@ void smt_params::updt_local_params(params_ref const & _p) {
m_nseq_max_nodes = p.nseq_max_nodes();
m_nseq_parikh = p.nseq_parikh();
m_nseq_regex_precheck = p.nseq_regex_precheck();
m_nseq_regex_factorization = p.nseq_regex_factorization();
m_nseq_signature = p.nseq_signature();
m_up_persist_clauses = p.up_persist_clauses();
validate_string_solver(m_string_solver);
@ -169,6 +170,9 @@ void smt_params::display(std::ostream & out) const {
DISPLAY_PARAM(m_lemmas2console);
DISPLAY_PARAM(m_logic);
DISPLAY_PARAM(m_string_solver);
DISPLAY_PARAM(m_nseq_parikh);
DISPLAY_PARAM(m_nseq_regex_precheck);
DISPLAY_PARAM(m_nseq_regex_factorization);
DISPLAY_PARAM(m_profile_res_sub);
DISPLAY_PARAM(m_display_bool_var2expr);

View file

@ -252,6 +252,7 @@ struct smt_params : public preprocessor_params,
unsigned m_nseq_max_nodes = 0;
bool m_nseq_parikh = false;
bool m_nseq_regex_precheck = true;
bool m_nseq_regex_factorization = true;
bool m_nseq_signature = false;
smt_params(params_ref const & p = params_ref()):

View file

@ -129,6 +129,7 @@ def_module_params(module_name='smt',
('nseq.max_nodes', UINT, 0, 'maximum number of DFS nodes explored by theory_nseq per solve() call (0 = unlimited)'),
('nseq.parikh', BOOL, False, 'enable Parikh image checks in nseq solver'),
('nseq.regex_precheck', BOOL, True, 'enable regex membership pre-check before DFS in theory_nseq: checks intersection emptiness per-variable and short-circuits SAT/UNSAT for regex-only problems'),
('nseq.regex_factorization', BOOL, True, 'enable syntactic regex factorization in theory_nseq: decomposes Boolean closure of regular expressions into primitive membership constraints'),
('nseq.signature', BOOL, False, 'enable heuristic signature-based string equation splitting in Nielsen solver'),
('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'),