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

cap cube size

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2025-08-17 18:22:50 -07:00
parent a5c9e370de
commit 53f32bf08f
3 changed files with 9 additions and 1 deletions

View file

@ -420,6 +420,8 @@ namespace smt {
for (unsigned i = start; i < stop; ++i) {
// copy the last cube so that expanding m_cubes doesn't invalidate reference.
auto cube = m_cubes[i];
if (cube.size() >= m_config.m_max_cube_size)
continue;
m_cubes.push_back(cube);
m_cubes.back().push_back(m.mk_not(atom));
m_cubes[i].push_back(atom);
@ -522,6 +524,7 @@ namespace smt {
m_cubes.reset();
m_cubes.push_back(expr_ref_vector(m)); // push empty cube
m_split_atoms.reset();
m_config.m_max_cube_size = smt_parallel_params(p.ctx.m_params).max_cube_size();
}
lbool parallel::operator()(expr_ref_vector const& asms) {

View file

@ -45,11 +45,15 @@ namespace smt {
is_exception_msg,
is_exception_code
};
struct config {
unsigned m_max_cube_size = 20;
};
ast_manager& m;
parallel& p;
std::mutex mux;
state m_state = state::is_running;
config m_config;
expr_ref_vector m_split_atoms; // atoms to split on
vector<expr_ref_vector> m_cubes;
unsigned m_max_batch_size = 10;