mirror of
https://github.com/Z3Prover/z3
synced 2026-06-03 07:37:54 +00:00
refactor
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
parent
8cb7373c21
commit
51778e3ef7
4 changed files with 9 additions and 9 deletions
|
|
@ -52,8 +52,8 @@ namespace nlsat {
|
||||||
// Since m_p_relation holds (lesser -> greater), we invert edges when populating dom: greater ▹ lesser.
|
// Since m_p_relation holds (lesser -> greater), we invert edges when populating dom: greater ▹ lesser.
|
||||||
std::vector<std::vector<bool>> m_prop_dom;
|
std::vector<std::vector<bool>> m_prop_dom;
|
||||||
|
|
||||||
assignment const& sample() const { return m_solver.get_assignment();}
|
assignment const& sample() const { return m_solver.sample();}
|
||||||
assignment & sample() { return m_solver.get_assignment(); }
|
assignment & sample() { return m_solver.sample(); }
|
||||||
|
|
||||||
// max_x plays the role of n in algorith 1 of the levelwise paper.
|
// max_x plays the role of n in algorith 1 of the levelwise paper.
|
||||||
impl(solver& solver, polynomial_ref_vector const& ps, var max_x, assignment const& s, pmanager& pm, anum_manager& am)
|
impl(solver& solver, polynomial_ref_vector const& ps, var max_x, assignment const& s, pmanager& pm, anum_manager& am)
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,8 @@ namespace nlsat {
|
||||||
bool m_add_zero_disc;
|
bool m_add_zero_disc;
|
||||||
bool m_cell_sample;
|
bool m_cell_sample;
|
||||||
|
|
||||||
assignment const & sample() const { return m_solver.get_assignment(); }
|
assignment const & sample() const { return m_solver.sample(); }
|
||||||
assignment & sample() { return m_solver.get_assignment(); }
|
assignment & sample() { return m_solver.sample(); }
|
||||||
|
|
||||||
struct todo_set {
|
struct todo_set {
|
||||||
polynomial::cache & m_cache;
|
polynomial::cache & m_cache;
|
||||||
|
|
@ -515,7 +515,7 @@ namespace nlsat {
|
||||||
if (max_var(p) == max)
|
if (max_var(p) == max)
|
||||||
elim_vanishing(p); // eliminate vanishing coefficients of max
|
elim_vanishing(p); // eliminate vanishing coefficients of max
|
||||||
if (is_const(p) || max_var(p) < max) {
|
if (is_const(p) || max_var(p) < max) {
|
||||||
int s = sign(p, m_solver.get_assignment(), m_am);
|
int s = sign(p, m_solver.sample(), m_am);
|
||||||
if (!is_const(p)) {
|
if (!is_const(p)) {
|
||||||
SASSERT(max_var(p) != null_var);
|
SASSERT(max_var(p) != null_var);
|
||||||
SASSERT(max_var(p) < max);
|
SASSERT(max_var(p) < max);
|
||||||
|
|
|
||||||
|
|
@ -4374,11 +4374,11 @@ namespace nlsat {
|
||||||
nlsat_params::collect_param_descrs(d);
|
nlsat_params::collect_param_descrs(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
const assignment &solver::get_assignment() const {
|
const assignment &solver::sample() const {
|
||||||
return m_imp->m_assignment;
|
return m_imp->m_assignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
assignment &solver::get_assignment() {
|
assignment &solver::sample() {
|
||||||
return m_imp->m_assignment;
|
return m_imp->m_assignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -244,8 +244,8 @@ namespace nlsat {
|
||||||
// -----------------------
|
// -----------------------
|
||||||
void updt_params(params_ref const & p);
|
void updt_params(params_ref const & p);
|
||||||
static void collect_param_descrs(param_descrs & d);
|
static void collect_param_descrs(param_descrs & d);
|
||||||
const assignment& get_assignment() const;
|
const assignment& sample() const;
|
||||||
assignment& get_assignment();
|
assignment& sample();
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
void collect_statistics(statistics & st);
|
void collect_statistics(statistics & st);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue