3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-17 17:40:16 +00:00

Add theory_seq_len: partial axiom instantiation for sequence length constraints

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-10 18:02:04 +00:00
parent 3ee78e242b
commit 56e9e9df57
6 changed files with 505 additions and 3 deletions

View file

@ -36,6 +36,7 @@ Revision History:
#include "smt/theory_seq.h"
#include "smt/theory_char.h"
#include "smt/theory_nseq.h"
#include "smt/theory_seq_len.h"
#include "smt/theory_special_relations.h"
#include "smt/theory_sls.h"
#include "smt/theory_pb.h"
@ -760,11 +761,14 @@ namespace smt {
else if (m_params.m_string_solver == "nseq") {
setup_nseq();
}
else if (m_params.m_string_solver == "seq_len") {
setup_seq_len();
}
else if (m_params.m_string_solver == "auto") {
setup_seq();
}
else {
throw default_exception("invalid parameter for smt.string_solver, valid options are 'seq', 'auto', 'nseq'");
throw default_exception("invalid parameter for smt.string_solver, valid options are 'seq', 'auto', 'nseq', 'seq_len'");
}
}
@ -796,6 +800,11 @@ namespace smt {
setup_char();
}
void setup::setup_seq_len() {
m_context.register_plugin(alloc(smt::theory_seq_len, m_context));
setup_char();
}
void setup::setup_finite_set() {
m_context.register_plugin(alloc(smt::theory_finite_set, m_context));
}