mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	fix bug in euf-completion relating to missed normalization
This commit is contained in:
		
							parent
							
								
									3fa81d6527
								
							
						
					
					
						commit
						ce6cfeaa68
					
				
					 2 changed files with 5 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -75,14 +75,14 @@ void elim_unconstrained::eliminate() {
 | 
			
		|||
            return;
 | 
			
		||||
 | 
			
		||||
        if (n.m_parents.empty()) {
 | 
			
		||||
            --n.m_refcount;
 | 
			
		||||
            n.m_refcount = 0;
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
        expr* e = get_parent(v);
 | 
			
		||||
        for (expr* p : n.m_parents)
 | 
			
		||||
            IF_VERBOSE(11, verbose_stream() << "parent " << mk_bounded_pp(p, m) << "\n");
 | 
			
		||||
        if (!e || !is_app(e) || !is_ground(e)) {
 | 
			
		||||
            --n.m_refcount;
 | 
			
		||||
            n.m_refcount = 0;
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
        app* t = to_app(e);
 | 
			
		||||
| 
						 | 
				
			
			@ -90,10 +90,9 @@ void elim_unconstrained::eliminate() {
 | 
			
		|||
        for (expr* arg : *to_app(t))
 | 
			
		||||
            m_args.push_back(get_node(arg).m_term);
 | 
			
		||||
        if (!m_inverter(t->get_decl(), m_args.size(), m_args.data(), r, side_cond)) {
 | 
			
		||||
            --n.m_refcount;
 | 
			
		||||
            n.m_refcount = 0;
 | 
			
		||||
            continue;
 | 
			
		||||
        }
 | 
			
		||||
        --n.m_refcount;
 | 
			
		||||
        SASSERT(r->get_sort() == t->get_sort());
 | 
			
		||||
        m_stats.m_num_eliminated++;
 | 
			
		||||
        n.m_refcount = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -98,7 +98,7 @@ namespace euf {
 | 
			
		|||
            if (g != f) {
 | 
			
		||||
                m_fmls.update(i, dependent_expr(m, g, dep));
 | 
			
		||||
                m_stats.m_num_rewrites++;
 | 
			
		||||
                IF_VERBOSE(10, verbose_stream() << mk_bounded_pp(f, m, 3) << " -> " << mk_bounded_pp(g, m, 3) << "\n");
 | 
			
		||||
                IF_VERBOSE(11, verbose_stream() << mk_bounded_pp(f, m, 3) << " -> " << mk_bounded_pp(g, m, 3) << "\n");
 | 
			
		||||
            }
 | 
			
		||||
            CTRACE("euf_completion", g != f, tout << mk_bounded_pp(f, m) << " -> " << mk_bounded_pp(g, m) << "\n");
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -174,7 +174,7 @@ namespace euf {
 | 
			
		|||
        bool change = false;
 | 
			
		||||
        for (expr* arg : *to_app(f)) {
 | 
			
		||||
            m_eargs.push_back(get_canonical(arg, d));
 | 
			
		||||
            change = arg != m_eargs.back();
 | 
			
		||||
            change |= arg != m_eargs.back();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (!change) 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue