3
0
Fork 0
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:
Nikolaj Bjorner 2014-01-06 16:23:37 -08:00
parent f1710e5618
commit 5adb4a22d1
3 changed files with 22 additions and 15 deletions

View file

@ -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;
}