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

helper functions to add constraints to univariate_solver

This commit is contained in:
Jakob Rath 2022-03-17 14:06:18 +01:00
parent edeba9b56a
commit 9d47d7959d
10 changed files with 52 additions and 4 deletions

View file

@ -207,4 +207,9 @@ namespace polysat {
return other.is_ule() && lhs() == other.to_ule().lhs() && rhs() == other.to_ule().rhs();
}
void ule_constraint::add_to_univariate_solver(solver& s, univariate_solver& us, unsigned dep, bool is_positive) const {
auto p_coeff = s.subst(lhs()).get_univariate_coefficients();
auto q_coeff = s.subst(rhs()).get_univariate_coefficients();
us.add_ule(p_coeff, q_coeff, !is_positive, dep);
}
}