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:
parent
f151879c0b
commit
72f09e4729
4 changed files with 18 additions and 71 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue