mirror of
https://github.com/Z3Prover/z3
synced 2025-05-10 17:25:47 +00:00
Polysat: conflict resolution updates (#5534)
* variable elimination / saturation sketch * conflict resolution updates
This commit is contained in:
parent
dc547510db
commit
9f387f5738
14 changed files with 343 additions and 294 deletions
|
@ -12,8 +12,32 @@ Author:
|
|||
|
||||
--*/
|
||||
#include "math/polysat/variable_elimination.h"
|
||||
#include "math/polysat/solver.h"
|
||||
#include <algorithm>
|
||||
|
||||
namespace polysat {
|
||||
|
||||
bool ve_reduction::perform(solver& s, pvar v, conflict_core& core) {
|
||||
// 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.
|
||||
auto pred = [&s, v](signed_constraint c) -> bool {
|
||||
return !c->contains_var(v) && c.is_currently_false(s);
|
||||
};
|
||||
auto it = std::find_if(core.begin(), core.end(), pred);
|
||||
if (it != core.end()) {
|
||||
signed_constraint c = *it;
|
||||
core.reset();
|
||||
core.set(c);
|
||||
// core.insert(c);
|
||||
// core.set_needs_model(true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ve_forbidden_intervals::perform(solver& s, pvar v, conflict_core& core) {
|
||||
NOT_IMPLEMENTED_YET();
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue