mirror of
https://github.com/Z3Prover/z3
synced 2025-06-21 13:23:39 +00:00
use simpler looking for loop
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d98a93bcc8
commit
f2b9c27ed6
1 changed files with 6 additions and 11 deletions
|
@ -20,17 +20,12 @@ namespace polysat {
|
||||||
bool ve_reduction::perform(solver& s, pvar v, conflict& core) {
|
bool ve_reduction::perform(solver& s, pvar v, conflict& core) {
|
||||||
// without any further hints, we just do core reduction with the stronger premise "C contains a c' that evaluates to false",
|
// without any further hints, we just do core reduction with the stronger premise "C contains a c' that evaluates to false",
|
||||||
// and kick out all other constraints.
|
// and kick out all other constraints.
|
||||||
auto pred = [&s, v](signed_constraint c) -> bool {
|
for (signed_constraint c : core) {
|
||||||
return !c->contains_var(v) && c.is_currently_false(s);
|
if (!c->contains_var(v) && c.is_currently_false(s)) {
|
||||||
};
|
core.reset();
|
||||||
auto it = std::find_if(core.begin(), core.end(), pred);
|
core.set(c);
|
||||||
if (it != core.end()) {
|
return true;
|
||||||
signed_constraint c = *it;
|
}
|
||||||
core.reset();
|
|
||||||
core.set(c);
|
|
||||||
// core.insert(c);
|
|
||||||
// core.set_needs_model(true);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue