mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Polysat: first pass at forbidden intervals (not yet fully integrated into solver) (#5227)
* Add interval class * Take dependency as const reference * Compute forbidden intervals for ule-constraints * Add class for evaluated interval * We need the evaluated bounds as well * Don't add constraint to cjust multiple times (hack, to be improved later) * typo * More interval helpers * Add constraint::ult factory function * Fix forbidden interval condition * Add solver::has_viable * Add conflict explanation using forbidden intervals (not yet fully integrated into solver)
This commit is contained in:
parent
60972de562
commit
f83705bf9f
14 changed files with 501 additions and 13 deletions
|
@ -21,7 +21,7 @@ namespace polysat {
|
|||
pdd m_lhs;
|
||||
pdd m_rhs;
|
||||
public:
|
||||
ule_constraint(unsigned lvl, bool_var bvar, csign_t sign, pdd const& l, pdd const& r, p_dependency_ref& dep):
|
||||
ule_constraint(unsigned lvl, bool_var bvar, csign_t sign, pdd const& l, pdd const& r, p_dependency_ref const& dep):
|
||||
constraint(lvl, bvar, sign, dep, ckind_t::ule_t), m_lhs(l), m_rhs(r) {
|
||||
m_vars.append(l.free_vars());
|
||||
for (auto v : r.free_vars())
|
||||
|
@ -39,6 +39,8 @@ namespace polysat {
|
|||
bool is_currently_false(solver& s) override;
|
||||
bool is_currently_true(solver& s) override;
|
||||
void narrow(solver& s) override;
|
||||
|
||||
bool forbidden_interval(solver& s, pvar v, eval_interval& i, constraint*& neg_condition) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue