3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00

better verbose pretty printing

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2014-09-09 16:57:43 -07:00
parent f151879c0b
commit 72f09e4729
4 changed files with 18 additions and 71 deletions

View file

@ -255,9 +255,9 @@ namespace opt {
}
}
lbool context::execute_min_max(unsigned index, bool committed, bool scoped) {
lbool context::execute_min_max(unsigned index, bool committed, bool scoped, bool is_max) {
if (scoped) get_solver().push();
lbool result = m_optsmt.lex(index);
lbool result = m_optsmt.lex(index, is_max);
if (result == l_true) m_optsmt.get_model(m_model);
if (scoped) get_solver().pop(1);
if (result == l_true && committed) m_optsmt.commit_assignment(index);
@ -277,8 +277,8 @@ namespace opt {
lbool context::execute(objective const& obj, bool committed, bool scoped) {
switch(obj.m_type) {
case O_MAXIMIZE: return execute_min_max(obj.m_index, committed, scoped);
case O_MINIMIZE: return execute_min_max(obj.m_index, committed, scoped);
case O_MAXIMIZE: return execute_min_max(obj.m_index, committed, scoped, true);
case O_MINIMIZE: return execute_min_max(obj.m_index, committed, scoped, false);
case O_MAXSMT: return execute_maxsat(obj.m_id, committed, scoped);
default: UNREACHABLE(); return l_undef;
}