mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
consolidate model.compact and model_compress #2704
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
1a9dfc5e80
commit
cb600a9329
10 changed files with 12 additions and 20 deletions
|
@ -21,6 +21,7 @@ Revision History:
|
|||
#include "util/scoped_ctrl_c.h"
|
||||
#include "util/file_path.h"
|
||||
#include "parsers/smt2/smt2parser.h"
|
||||
#include "model/model_params.hpp"
|
||||
#include "opt/opt_context.h"
|
||||
#include "opt/opt_cmds.h"
|
||||
#include "opt/opt_parse.h"
|
||||
|
@ -210,7 +211,8 @@ extern "C" {
|
|||
to_optimize_ptr(o)->get_model(_m);
|
||||
Z3_model_ref * m_ref = alloc(Z3_model_ref, *mk_c(c));
|
||||
if (_m) {
|
||||
if (mk_c(c)->params().m_model_compress) _m->compress();
|
||||
model_params mp(to_optimize_ptr(o)->get_params());
|
||||
if (mp.compact()) _m->compress();
|
||||
m_ref->m_model = _m;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -31,6 +31,7 @@ Revision History:
|
|||
#include "api/api_model.h"
|
||||
#include "api/api_stats.h"
|
||||
#include "api/api_ast_vector.h"
|
||||
#include "model/model_params.hpp"
|
||||
#include "smt/smt_solver.h"
|
||||
#include "smt/smt_implied_equalities.h"
|
||||
#include "solver/smt_logics.h"
|
||||
|
@ -618,7 +619,8 @@ extern "C" {
|
|||
RETURN_Z3(nullptr);
|
||||
}
|
||||
if (_m) {
|
||||
if (mk_c(c)->params().m_model_compress) _m->compress();
|
||||
model_params mp(to_solver_ref(s)->get_params());
|
||||
if (mp.compact()) _m->compress();
|
||||
}
|
||||
Z3_model_ref * m_ref = alloc(Z3_model_ref, *mk_c(c));
|
||||
m_ref->m_model = _m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue