mirror of
https://github.com/Z3Prover/z3
synced 2025-05-14 03:04:44 +00:00
helper functions to add constraints to univariate_solver
This commit is contained in:
parent
edeba9b56a
commit
9d47d7959d
10 changed files with 52 additions and 4 deletions
|
@ -166,4 +166,10 @@ namespace polysat {
|
|||
bool mul_ovfl_constraint::operator==(constraint const& other) const {
|
||||
return other.is_mul_ovfl() && p() == other.to_mul_ovfl().p() && q() == other.to_mul_ovfl().q();
|
||||
}
|
||||
|
||||
void mul_ovfl_constraint::add_to_univariate_solver(solver& s, univariate_solver& us, unsigned dep, bool is_positive) const {
|
||||
auto p_coeff = s.subst(p()).get_univariate_coefficients();
|
||||
auto q_coeff = s.subst(q()).get_univariate_coefficients();
|
||||
us.add_umul_ovfl(p_coeff, q_coeff, !is_positive, dep);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue