mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
Add model.user_functions (default true) to control whether user functions are added to the model.
This commit is contained in:
parent
a24a922688
commit
d790523c59
|
@ -1815,6 +1815,9 @@ void cmd_context::display_model(model_ref& mdl) {
|
|||
}
|
||||
|
||||
void cmd_context::add_declared_functions(model& mdl) {
|
||||
model_params p;
|
||||
if (!p.user_functions())
|
||||
return;
|
||||
for (auto const& kv : m_func_decls) {
|
||||
func_decl* f = kv.m_value.first();
|
||||
if (f->get_family_id() == null_family_id && !mdl.has_interpretation(f)) {
|
||||
|
|
|
@ -5,6 +5,7 @@ def_module_params('model',
|
|||
('v2', BOOL, False, 'use Z3 version 2.x (x <= 16) pretty printer'),
|
||||
('compact', BOOL, True, 'try to compact function graph (i.e., function interpretations that are lookup tables)'),
|
||||
('inline_def', BOOL, False, 'inline local function definitions ignoring possible expansion'),
|
||||
('user_functions', BOOL, True, 'include user defined functions in model'),
|
||||
('completion', BOOL, False, 'enable/disable model completion'),
|
||||
))
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ Revision History:
|
|||
#include "ast/proofs/proof_checker.h"
|
||||
#include "ast/ast_util.h"
|
||||
#include "ast/well_sorted.h"
|
||||
#include "model/model_params.hpp"
|
||||
#include "model/model.h"
|
||||
#include "model/model_pp.h"
|
||||
#include "smt/smt_context.h"
|
||||
|
@ -4638,7 +4639,8 @@ namespace smt {
|
|||
}
|
||||
|
||||
void context::add_rec_funs_to_model() {
|
||||
if (m_model)
|
||||
model_params p;
|
||||
if (m_model && p.user_functions())
|
||||
m_model->add_rec_funs();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue