mirror of
https://github.com/Z3Prover/z3
synced 2025-08-26 13:06:05 +00:00
update experiment notes
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ca831bedcb
commit
c4607c2ba3
3 changed files with 51 additions and 3 deletions
|
@ -255,17 +255,21 @@ threads-4-none
|
|||
threads-4-shareunits
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=true smt_parallel.share_conflicts=false smt_parallel.share_units=true
|
||||
|
||||
threads-4-shareconflicts
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=true smt_parallel.share_conflicts=true smt_parallel.share_units=false
|
||||
|
||||
threads-4-cube-frugal
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=false smt_parallel.frugal_cube_only=true smt_parallel.share_conflicts=false smt_parallel.share_units=false
|
||||
|
||||
threads-4-cube-frugal-shareconflicts
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=false smt_parallel.frugal_cube_only=true smt_parallel.share_conflicts=true smt_parallel.share_units=false
|
||||
|
||||
threads-4-shareunits-nonrelevant
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=true smt_parallel.share_conflicts=true smt_parallel.share_units=false smt_parallel.relevant_units_only=false
|
||||
|
||||
threads-4-cube
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=false smt_parallel.frugal_cube_only=false smt_parallel.share_conflicts=false smt_parallel.share_units=false
|
||||
|
||||
threads-4-cube-shareconflicts
|
||||
-T:30 smt.threads=4 tactic.default_tactic=smt smt_parallel.never_cube=false smt_parallel.frugal_cube_only=false smt_parallel.share_conflicts=true smt_parallel.share_units=false
|
||||
|
||||
</pre>
|
||||
|
||||
Ideas for other knobs that can be added:
|
||||
|
|
|
@ -157,6 +157,42 @@ namespace smt {
|
|||
m_num_shared_units = sz;
|
||||
}
|
||||
|
||||
void parallel::batch_manager::init_parameters_state() {
|
||||
auto& smt_params = p.ctx.get_fparams();
|
||||
std::function<std::function<void(void)>(unsigned&)> inc = [](unsigned& v) { std::function<void(void)> clo = [&]() { ++v; }; return clo; };
|
||||
std::function<std::function<void(void)>(unsigned&)> dec = [](unsigned& v) { std::function<void(void)> clo = [&]() { if (v > 0) --v; }; return clo; };
|
||||
std::function<std::function<void(void)>(bool&)> incb = [](bool& v) { std::function<void(void)> clo = [&]() { v = true; }; return clo; };
|
||||
std::function<std::function<void(void)>(bool&)> decb = [](bool& v) { std::function<void(void)> clo = [&]() { v = false; }; return clo; };
|
||||
std::function<parameter_state(unsigned&)> unsigned_parameter = [&](unsigned& p) -> parameter_state {
|
||||
return { { { p , 1.0}},
|
||||
{ { 1.0, inc(p) }, { 1.0, dec(p) }}
|
||||
};
|
||||
};
|
||||
std::function<parameter_state(bool&)> bool_parameter = [&](bool& p) -> parameter_state {
|
||||
return { { { p , 1.0}},
|
||||
{ { 1.0, incb(p) }, { 1.0, decb(p) }}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
parameter_state s1 = unsigned_parameter(smt_params.m_arith_branch_cut_ratio);
|
||||
parameter_state s2 = bool_parameter(smt_params.m_arith_eager_eq_axioms);
|
||||
|
||||
|
||||
// arith.enable_hnf(bool) (default: true)
|
||||
// arith.greatest_error_pivot(bool) (default: false)
|
||||
// arith.int_eq_branch(bool) (default: false)
|
||||
// arith.min(bool) (default: false)
|
||||
// arith.nl.branching(bool) (default: true)
|
||||
// arith.nl.cross_nested(bool) (default: true)
|
||||
// arith.nl.delay(unsigned int) (default: 10)
|
||||
// arith.nl.expensive_patching(bool) (default: false)
|
||||
// arith.nl.expp(bool) (default: false)
|
||||
// arith.nl.gr_q(unsigned int) (default: 10)
|
||||
// arith.nl.grobner(bool) (default: true)
|
||||
// arith.nl.grobner_cnfl_to_report(unsigned int) (default: 1) };
|
||||
}
|
||||
|
||||
void parallel::batch_manager::collect_clause(ast_translation& l2g, unsigned source_worker_id, expr* clause) {
|
||||
std::scoped_lock lock(mux);
|
||||
expr* g_clause = l2g(clause);
|
||||
|
|
|
@ -32,6 +32,11 @@ namespace smt {
|
|||
expr_ref clause;
|
||||
};
|
||||
|
||||
struct parameter_state {
|
||||
std::vector<std::pair<unsigned, double>> m_value_scores; // bounded number of values with scores.
|
||||
std::vector<std::pair<double, std::function<void(void)>>> m_weighted_moves; // possible moves weighted by how well they did
|
||||
};
|
||||
|
||||
class batch_manager {
|
||||
enum state {
|
||||
is_running,
|
||||
|
@ -52,6 +57,7 @@ namespace smt {
|
|||
std::string m_exception_msg;
|
||||
vector<shared_clause> shared_clause_trail; // store all shared clauses with worker IDs
|
||||
obj_hashtable<expr> shared_clause_set; // for duplicate filtering on per-thread clause expressions
|
||||
vector<parameter_state> m_parameters_state;
|
||||
|
||||
// called from batch manager to cancel other workers if we've reached a verdict
|
||||
void cancel_workers() {
|
||||
|
@ -60,6 +66,8 @@ namespace smt {
|
|||
w->cancel();
|
||||
}
|
||||
|
||||
void init_parameters_state();
|
||||
|
||||
public:
|
||||
batch_manager(ast_manager& m, parallel& p) : m(m), p(p), m_split_atoms(m) { }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue