3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-31 08:23:17 +00:00

add model.inline_def option to make #2517 happy

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-08-29 12:08:09 -03:00
parent 35fa24a82a
commit a8bfab3273
4 changed files with 19 additions and 3 deletions

View file

@ -27,12 +27,14 @@ Revision History:
#include "ast/for_each_expr.h"
#include "ast/for_each_ast.h"
#include "model/model.h"
#include "model/model_params.hpp"
#include "model/model_evaluator.h"
model::model(ast_manager & m):
model_core(m),
m_mev(*this),
m_cleaned(false) {
m_cleaned(false),
m_inline(false) {
}
model::~model() {
@ -43,6 +45,13 @@ model::~model() {
}
}
void model::updt_params(params_ref const & p) {
model_params mp(p);
m_inline = mp.inline_def();
m_mev.updt_params(p);
}
void model::copy_const_interps(model const & source) {
for (auto const& kv : source.m_interp)
register_decl(kv.m_key, kv.m_value);
@ -353,6 +362,7 @@ bool model::can_inline_def(top_sort& ts, func_decl* f) {
func_interp* fi = get_func_interp(f);
if (!fi) return false;
if (fi->get_else() == nullptr) return false;
if (m_inline) return true;
expr* e = fi->get_else();
obj_hashtable<expr> subs;
ptr_buffer<expr> todo;