3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

testing inc_sat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-07-31 22:29:47 -07:00
parent 365f05b41a
commit 39414d8b8d
9 changed files with 200 additions and 95 deletions

View file

@ -78,6 +78,7 @@ public:
}
void new_assumption(expr* e, app* cls, rational const& w) {
TRACE("opt", tout << "insert: " << mk_pp(e, m) << " : " << w << "\n";);
info inf(cls, w);
m_asm2info.insert(e, inf);
m_asms.push_back(e);
@ -186,7 +187,8 @@ public:
for (unsigned i = 0; i < core.size(); ++i) {
rational w2 = get_weight(core[i]);
if (w2 > w) {
new_assumption(core[i], get_clause(core[i]), w2 - w);
rational w3 = w2 - w;
new_assumption(core[i], get_clause(core[i]), w3);
}
}
return w;
@ -194,7 +196,7 @@ public:
void display_vec(std::ostream& out, unsigned sz, expr* const* args) {
for (unsigned i = 0; i < sz; ++i) {
out << mk_pp(args[i], m) << " ";
out << mk_pp(args[i], m) << " : " << get_weight(args[i]) << " ";
}
out << "\n";
}