mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 19:35:50 +00:00
enable partial results
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f1710e5618
commit
5adb4a22d1
3 changed files with 22 additions and 15 deletions
|
@ -139,10 +139,11 @@ namespace opt {
|
|||
}
|
||||
|
||||
lbool context::execute_maxsat(symbol const& id, bool committed) {
|
||||
model_ref tmp;
|
||||
maxsmt& ms = *m_maxsmts.find(id);
|
||||
lbool result = ms(get_solver());
|
||||
if (result == l_true && committed) ms.commit_assignment();
|
||||
if (result == l_true) ms.get_model(m_model);
|
||||
if (result != l_false && (ms.get_model(tmp), tmp.get())) ms.get_model(m_model);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue