mirror of
https://github.com/Z3Prover/z3
synced 2025-08-05 10:50:24 +00:00
add phase selection to theory-aware branching queue
This commit is contained in:
parent
dd03632f3d
commit
a9ec8666f0
1 changed files with 26 additions and 18 deletions
|
@ -1231,6 +1231,9 @@ namespace smt {
|
||||||
smt_params & m_params;
|
smt_params & m_params;
|
||||||
theory_var_priority_map m_theory_var_priority;
|
theory_var_priority_map m_theory_var_priority;
|
||||||
theory_aware_act_queue m_queue;
|
theory_aware_act_queue m_queue;
|
||||||
|
|
||||||
|
int_hashtable<int_hash, default_eq<bool_var> > m_theory_vars;
|
||||||
|
map<bool_var, lbool, int_hash, default_eq<bool_var> > m_theory_var_phase;
|
||||||
public:
|
public:
|
||||||
theory_aware_branching_queue(context & ctx, smt_params & p):
|
theory_aware_branching_queue(context & ctx, smt_params & p):
|
||||||
m_context(ctx),
|
m_context(ctx),
|
||||||
|
@ -1290,12 +1293,17 @@ namespace smt {
|
||||||
}
|
}
|
||||||
|
|
||||||
next = null_bool_var;
|
next = null_bool_var;
|
||||||
|
if (m_theory_vars.contains(next)) {
|
||||||
|
if (!m_theory_var_phase.find(next, phase)) {
|
||||||
|
phase = l_undef;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void add_theory_aware_branching_info(bool_var v, double priority, lbool phase) {
|
virtual void add_theory_aware_branching_info(bool_var v, double priority, lbool phase) {
|
||||||
TRACE("theory_aware_branching", tout << "Add theory-aware branching information for l#" << v << ": priority=" << priority << std::endl;);
|
TRACE("theory_aware_branching", tout << "Add theory-aware branching information for l#" << v << ": priority=" << priority << std::endl;);
|
||||||
// m_theory_vars.insert(v);
|
m_theory_vars.insert(v);
|
||||||
// m_theory_var_phase.insert(v, phase);
|
m_theory_var_phase.insert(v, phase);
|
||||||
m_theory_var_priority.insert(v, priority);
|
m_theory_var_priority.insert(v, priority);
|
||||||
if (m_queue.contains(v)) {
|
if (m_queue.contains(v)) {
|
||||||
if (priority > 0.0) {
|
if (priority > 0.0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue