mirror of
https://github.com/Z3Prover/z3
synced 2025-05-13 02:34:43 +00:00
Polysat: check test results, forbidden intervals for coefficient -1 (#5241)
* Use scoped_ptr for condition * Check solver result in unit tests * Add test for unusual cjust * Add solver::get_value * Broken assertion * Support forbidden interval for coefficient -1
This commit is contained in:
parent
5791b41133
commit
fd1758ffab
8 changed files with 164 additions and 58 deletions
|
@ -70,16 +70,14 @@ namespace polysat {
|
|||
rational longest_len;
|
||||
unsigned longest_i = UINT_MAX;
|
||||
for (constraint* c : conflict) {
|
||||
LOG("constraint: " << *c);
|
||||
LOG_H3("Computing forbidden interval for: " << *c);
|
||||
eval_interval interval = eval_interval::full();
|
||||
constraint* neg_cond = nullptr; // TODO: change to scoped_ptr
|
||||
scoped_ptr<constraint> neg_cond;
|
||||
if (c->forbidden_interval(s, v, interval, neg_cond)) {
|
||||
LOG("~> interval: " << interval);
|
||||
LOG(" neg_cond: " << show_deref(neg_cond));
|
||||
if (interval.is_currently_empty()) {
|
||||
dealloc(neg_cond);
|
||||
LOG("interval: " << interval);
|
||||
LOG("neg_cond: " << show_deref(neg_cond));
|
||||
if (interval.is_currently_empty())
|
||||
continue;
|
||||
}
|
||||
if (interval.is_full())
|
||||
has_full = true;
|
||||
else {
|
||||
|
@ -89,7 +87,7 @@ namespace polysat {
|
|||
longest_i = records.size();
|
||||
}
|
||||
}
|
||||
records.push_back({std::move(interval), neg_cond, c});
|
||||
records.push_back({std::move(interval), std::move(neg_cond), c});
|
||||
if (has_full)
|
||||
break;
|
||||
}
|
||||
|
@ -119,6 +117,7 @@ namespace polysat {
|
|||
return false;
|
||||
}
|
||||
LOG("seq: " << seq);
|
||||
SASSERT(seq.size() >= 2); // otherwise has_full should have been true
|
||||
|
||||
p_dependency* d = nullptr;
|
||||
unsigned lemma_lvl = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue