3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-10-16 04:20:25 +00:00

very basic refinement loop breaking

This commit is contained in:
Jakob Rath 2022-12-15 13:39:48 +01:00
parent 3d06a90e7f
commit 5de0007157
3 changed files with 158 additions and 26 deletions

View file

@ -32,6 +32,15 @@ namespace polysat {
class univariate_solver;
class univariate_solver_factory;
enum class find_t {
empty,
singleton,
multiple,
resource_out,
};
std::ostream& operator<<(std::ostream& out, find_t x);
class viable {
friend class test_fi;
@ -67,6 +76,16 @@ namespace polysat {
void propagate(pvar v, rational const& val);
enum class query_t {
has_viable, // currently only used internally in resolve_viable
min_viable, // currently unused
max_viable, // currently unused
find_viable,
};
// template <query_t mode>
find_t query(query_t mode, pvar v, rational& out_lo, rational& out_hi);
public:
viable(solver& s);
@ -112,7 +131,7 @@ namespace polysat {
/**
* Find a next viable value for variable.
*/
dd::find_t find_viable(pvar v, rational & val);
find_t find_viable(pvar v, rational& out_val);
/**
* Retrieve the unsat core for v,
@ -255,7 +274,7 @@ namespace polysat {
bool check_constraints(assignment const& a, pvar v) { return !find_violated_constraint(a, v); }
signed_constraint find_violated_constraint(assignment const& a, pvar v);
dd::find_t find_viable(pvar v, rational& out_val);
find_t find_viable(pvar v, rational& out_val);
signed_constraints unsat_core(pvar v);
};