3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +00:00

fix model extraction for 0-ary recursive function declarations

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-11-01 09:55:27 -05:00
parent e75d07c1c1
commit d9e77ba443

View file

@ -4460,6 +4460,11 @@ namespace smt {
auto& def = u.get_def(f);
expr* rhs = def.get_rhs();
if (!rhs) continue;
if (f->get_arity() == 0) {
m_model->register_decl(f, rhs);
continue;
}
func_interp* fi = alloc(func_interp, m, f->get_arity());
// reverse argument order so that variable 0 starts at the beginning.
expr_ref_vector subst(m);