3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 03:57:51 +00:00

Change univariate fallback solver to one-shot mode for now

This commit is contained in:
Jakob Rath 2022-08-02 12:42:34 +02:00
parent 6c4d60c5af
commit a76f977f85
3 changed files with 35 additions and 17 deletions

View file

@ -19,6 +19,7 @@ Author:
#include <limits>
#include "util/dlist.h"
#include "util/map.h"
#include "util/small_object_allocator.h"
#include "math/polysat/types.h"
#include "math/polysat/conflict.h"
@ -223,12 +224,11 @@ namespace polysat {
return v.v.display(out, v.var);
}
// TODO: don't push on each constraint add/remove; but only when necessary
class viable_fallback {
solver& s;
scoped_ptr<univariate_solver_factory> m_usolver_factory;
scoped_ptr_vector<univariate_solver> m_usolver;
u_map<scoped_ptr<univariate_solver>> m_usolver; // univariate solver for each bit width
vector<signed_constraints> m_constraints;
svector<unsigned> m_constraints_trail;
@ -245,7 +245,6 @@ namespace polysat {
// Check whether all constraints for 'v' are satisfied.
bool check_constraints(pvar v);
// bool check_value(pvar v, rational const& val);
dd::find_t find_viable(pvar v, rational& out_val);
signed_constraints unsat_core(pvar v);