mirror of
https://github.com/Z3Prover/z3
synced 2025-08-26 13:06:05 +00:00
prepare for new viable
This commit is contained in:
parent
b0bf03457c
commit
d86570ce75
8 changed files with 99 additions and 13 deletions
|
@ -32,8 +32,12 @@ Author:
|
|||
#include "math/polysat/forbidden_intervals.h"
|
||||
#include "math/polysat/trail.h"
|
||||
#include "math/polysat/viable.h"
|
||||
#include "math/polysat/viable2.h"
|
||||
#include "math/polysat/log.h"
|
||||
|
||||
|
||||
#define NEW_VIABLE 0
|
||||
|
||||
namespace polysat {
|
||||
|
||||
class solver {
|
||||
|
@ -71,7 +75,11 @@ namespace polysat {
|
|||
|
||||
reslimit& m_lim;
|
||||
params_ref m_params;
|
||||
#if NEW_VIABLE
|
||||
viable2 m_viable;
|
||||
#else
|
||||
viable m_viable; // viable sets per variable
|
||||
#endif
|
||||
scoped_ptr_vector<dd::pdd_manager> m_pdd;
|
||||
linear_solver m_linear_solver;
|
||||
conflict m_conflict;
|
||||
|
@ -92,7 +100,9 @@ namespace polysat {
|
|||
// Per variable information
|
||||
vector<rational> m_value; // assigned value
|
||||
vector<justification> m_justification; // justification for variable assignment
|
||||
#if !NEW_VIABLE
|
||||
vector<signed_constraints> m_cjust; // constraints justifying variable range.
|
||||
#endif
|
||||
vector<signed_constraints> m_pwatch; // watch list datastructure into constraints.
|
||||
|
||||
unsigned_vector m_activity;
|
||||
|
@ -121,6 +131,7 @@ namespace polysat {
|
|||
m_qhead_trail.pop_back();
|
||||
}
|
||||
|
||||
#if !NEW_VIABLE
|
||||
void push_cjust(pvar v, signed_constraint c) {
|
||||
if (m_cjust[v].contains(c)) // TODO: better check (flag on constraint?)
|
||||
return;
|
||||
|
@ -130,6 +141,7 @@ namespace polysat {
|
|||
m_trail.push_back(trail_instr_t::just_i);
|
||||
m_cjust_trail.push_back(v);
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned size(pvar v) const { return m_size[v]; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue