mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-03 21:09:11 +00:00 
			
		
		
		
	fix #5424
This commit is contained in:
		
							parent
							
								
									848a8ebb98
								
							
						
					
					
						commit
						800fef6653
					
				
					 2 changed files with 8 additions and 5 deletions
				
			
		| 
						 | 
					@ -22,6 +22,7 @@ Revision History:
 | 
				
			||||||
#include "ast/ast_ll_pp.h"
 | 
					#include "ast/ast_ll_pp.h"
 | 
				
			||||||
#include "ast/rewriter/var_subst.h"
 | 
					#include "ast/rewriter/var_subst.h"
 | 
				
			||||||
#include "ast/rewriter/th_rewriter.h"
 | 
					#include "ast/rewriter/th_rewriter.h"
 | 
				
			||||||
 | 
					#include "ast/rewriter/expr_safe_replace.h"
 | 
				
			||||||
#include "ast/array_decl_plugin.h"
 | 
					#include "ast/array_decl_plugin.h"
 | 
				
			||||||
#include "ast/bv_decl_plugin.h"
 | 
					#include "ast/bv_decl_plugin.h"
 | 
				
			||||||
#include "ast/recfun_decl_plugin.h"
 | 
					#include "ast/recfun_decl_plugin.h"
 | 
				
			||||||
| 
						 | 
					@ -605,12 +606,13 @@ void model::add_rec_funs() {
 | 
				
			||||||
                
 | 
					                
 | 
				
			||||||
        func_interp* fi = alloc(func_interp, m, f->get_arity());
 | 
					        func_interp* fi = alloc(func_interp, m, f->get_arity());
 | 
				
			||||||
        // reverse argument order so that variable 0 starts at the beginning.
 | 
					        // reverse argument order so that variable 0 starts at the beginning.
 | 
				
			||||||
        expr_ref_vector subst(m);
 | 
					        expr_safe_replace subst(m);
 | 
				
			||||||
        for (unsigned i = 0; i < f->get_arity(); ++i) {
 | 
					        unsigned arity = f->get_arity();
 | 
				
			||||||
            subst.push_back(m.mk_var(i, f->get_domain(i)));
 | 
					        for (unsigned i = 0; i < arity; ++i) {
 | 
				
			||||||
 | 
					            subst.insert(m.mk_var(arity - i - 1, f->get_domain(i)), m.mk_var(i, f->get_domain(i)));            
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        var_subst sub(m, true);
 | 
					        expr_ref bodyr(m);
 | 
				
			||||||
        expr_ref bodyr = sub(rhs, subst);
 | 
					        subst(rhs, bodyr);
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
        fi->set_else(bodyr);
 | 
					        fi->set_else(bodyr);
 | 
				
			||||||
        register_decl(f, fi);
 | 
					        register_decl(f, fi);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -69,6 +69,7 @@ namespace q {
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (idx == UINT_MAX)
 | 
					        if (idx == UINT_MAX)
 | 
				
			||||||
            return l_false;
 | 
					            return l_false;
 | 
				
			||||||
 | 
					        c.m_watch = idx;
 | 
				
			||||||
        return l_undef;
 | 
					        return l_undef;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue