3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-14 04:48:45 +00:00

fix ##7175 - don't add user macros/functions when smtlib2_compliant=true

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2024-03-20 22:05:30 -07:00
parent 27a9b8bd03
commit 530c6fc625

View file

@ -1894,6 +1894,8 @@ void cmd_context::add_declared_functions(model& mdl) {
model_params p;
if (!p.user_functions())
return;
if (m_params.m_smtlib2_compliant)
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)) {
@ -2066,7 +2068,10 @@ void cmd_context::complete_model(model_ref& md) const {
if (m_macros.find(k, decls))
body = decls.find(f->get_arity(), f->get_domain());
if (body && m_params.m_smtlib2_compliant)
continue;
sort * range = f->get_range();
if (!body)
body = m().get_some_value(range);
if (f->get_arity() > 0) {