3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 15:55:46 +00:00

address ubuntu warning and add shortcuts for maxsat

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-10-03 16:22:13 -07:00
parent 186afe7d10
commit e3f0aff318
6 changed files with 56 additions and 12 deletions

View file

@ -267,8 +267,10 @@ namespace opt {
void maxsmt::display_answer(std::ostream& out) const {
for (unsigned i = 0; i < m_soft_constraints.size(); ++i) {
out << mk_pp(m_soft_constraints[i], m)
<< (get_assignment(i)?" |-> true\n":" |-> false\n");
expr* e = m_soft_constraints[i];
bool is_not = m.is_not(e, e);
out << mk_pp(e, m)
<< ((is_not != get_assignment(i))?" |-> true\n":" |-> false\n");
}
}