3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 07:45:46 +00:00

fix bugs related to model-converter

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-01-17 12:25:24 -08:00
parent ae728374c8
commit 7b8101c502
20 changed files with 211 additions and 112 deletions

View file

@ -56,16 +56,14 @@ public:
}
virtual void execute(cmd_context & ctx) {
if (!ctx.is_model_available())
model_ref md;
if (!ctx.is_model_available(md))
throw cmd_exception("model is not available");
if (!m_target)
throw cmd_exception("no arguments passed to eval");
model_ref md;
unsigned index = m_params.get_uint("model_index", 0);
check_sat_result * last_result = ctx.get_check_sat_result();
SASSERT(last_result);
if (index == 0 || !ctx.get_opt()) {
last_result->get_model(md);
// already have model.
}
else {
ctx.get_opt()->get_box_model(md, index);