mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	Cleanup iuc_proof
This commit is contained in:
		
							parent
							
								
									ebf6b18821
								
							
						
					
					
						commit
						abe67705d3
					
				
					 4 changed files with 211 additions and 260 deletions
				
			
		| 
						 | 
					@ -11,16 +11,11 @@ namespace spacer {
 | 
				
			||||||
 * init
 | 
					 * init
 | 
				
			||||||
 * ====================================
 | 
					 * ====================================
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
    iuc_proof::iuc_proof(ast_manager& m, proof* pr, expr_set& b_conjuncts) : m(m), m_pr(pr,m)
 | 
					iuc_proof::iuc_proof(ast_manager& m, proof* pr, expr_set& core_lits) :
 | 
				
			||||||
    {
 | 
					    m(m), m_pr(pr,m) {
 | 
				
			||||||
    // init A-marks and B-marks
 | 
					    // init A-marks and B-marks
 | 
				
			||||||
        collect_symbols_b(b_conjuncts);
 | 
					    collect_core_symbols(core_lits);
 | 
				
			||||||
        compute_marks(b_conjuncts);
 | 
					    compute_marks(core_lits);
 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    proof* iuc_proof::get()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return m_pr.get();
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
| 
						 | 
					@ -42,12 +37,11 @@ namespace spacer {
 | 
				
			||||||
    void operator()(quantifier*) {}
 | 
					    void operator()(quantifier*) {}
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void iuc_proof::collect_symbols_b(expr_set& b_conjuncts)
 | 
					void iuc_proof::collect_core_symbols(expr_set& core_lits)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    expr_mark visited;
 | 
					    expr_mark visited;
 | 
				
			||||||
        collect_pure_proc proc(m_symbols_b);
 | 
					    collect_pure_proc proc(m_core_symbols);
 | 
				
			||||||
        for (expr_set::iterator it = b_conjuncts.begin(); it != b_conjuncts.end(); ++it)
 | 
					    for (expr_set::iterator it = core_lits.begin(); it != core_lits.end(); ++it) {
 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
        for_each_expr(proc, visited, *it);
 | 
					        for_each_expr(proc, visited, *it);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -78,157 +72,116 @@ namespace spacer {
 | 
				
			||||||
    void operator()(quantifier*) {}
 | 
					    void operator()(quantifier*) {}
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // requires that m_symbols_b has already been computed, which is done during initialization.
 | 
					bool iuc_proof::is_core_pure(expr* e) const
 | 
				
			||||||
    bool iuc_proof::only_contains_symbols_b(expr* expr) const
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
        is_pure_expr_proc proc(m_symbols_b, m);
 | 
					    is_pure_expr_proc proc(m_core_symbols, m);
 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
            for_each_expr(proc, expr);
 | 
					        for_each_expr(proc, e);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    catch (is_pure_expr_proc::non_pure)
 | 
					    catch (is_pure_expr_proc::non_pure)
 | 
				
			||||||
        {
 | 
					    {return false;}
 | 
				
			||||||
            return false;
 | 
					
 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /*
 | 
					void iuc_proof::compute_marks(expr_set& core_lits)
 | 
				
			||||||
     * ====================================
 | 
					 | 
				
			||||||
     * methods for computing which premises
 | 
					 | 
				
			||||||
     * have been used to derive the conclusions
 | 
					 | 
				
			||||||
     * ====================================
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    void iuc_proof::compute_marks(expr_set& b_conjuncts)
 | 
					 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    proof_post_order it(m_pr, m);
 | 
					    proof_post_order it(m_pr, m);
 | 
				
			||||||
    while (it.hasNext())
 | 
					    while (it.hasNext())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
            proof* currentNode = it.next();
 | 
					        proof* cur = it.next();
 | 
				
			||||||
 | 
					        if (m.get_num_parents(cur) == 0)
 | 
				
			||||||
            if (m.get_num_parents(currentNode) == 0)
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
                switch(currentNode->get_decl_kind())
 | 
					            switch(cur->get_decl_kind())
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					            case PR_ASSERTED:
 | 
				
			||||||
                    case PR_ASSERTED: // currentNode is an axiom
 | 
					                if (core_lits.contains(m.get_fact(cur)))
 | 
				
			||||||
                    {
 | 
					                    m_b_mark.mark(cur, true);
 | 
				
			||||||
                        if (b_conjuncts.contains(m.get_fact(currentNode)))
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            m_b_mark.mark(currentNode, true);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                else
 | 
					                else
 | 
				
			||||||
                        {
 | 
					                    m_a_mark.mark(cur, true);
 | 
				
			||||||
                            m_a_mark.mark(currentNode, true);
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                        // currentNode is a hypothesis:
 | 
					 | 
				
			||||||
            case PR_HYPOTHESIS:
 | 
					            case PR_HYPOTHESIS:
 | 
				
			||||||
                    {
 | 
					                m_h_mark.mark(cur, true);
 | 
				
			||||||
                        m_h_mark.mark(currentNode, true);
 | 
					 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
            default:
 | 
					            default:
 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                break;
 | 
					                break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
                // collect from parents whether derivation of current node contains A-axioms, B-axioms and hypothesis
 | 
					            // collect from parents whether derivation of current node
 | 
				
			||||||
 | 
					            // contains A-axioms, B-axioms and hypothesis
 | 
				
			||||||
            bool need_to_mark_a = false;
 | 
					            bool need_to_mark_a = false;
 | 
				
			||||||
            bool need_to_mark_b = false;
 | 
					            bool need_to_mark_b = false;
 | 
				
			||||||
            bool need_to_mark_h = false;
 | 
					            bool need_to_mark_h = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                for (unsigned i = 0; i < m.get_num_parents(currentNode); ++i)
 | 
					            for (unsigned i = 0; i < m.get_num_parents(cur); ++i)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                    SASSERT(m.is_proof(currentNode->get_arg(i)));
 | 
					                SASSERT(m.is_proof(cur->get_arg(i)));
 | 
				
			||||||
                    proof* premise = to_app(currentNode->get_arg(i));
 | 
					                proof* premise = to_app(cur->get_arg(i));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    need_to_mark_a = need_to_mark_a || m_a_mark.is_marked(premise);
 | 
					                need_to_mark_a |= m_a_mark.is_marked(premise);
 | 
				
			||||||
                    need_to_mark_b = need_to_mark_b || m_b_mark.is_marked(premise);
 | 
					                need_to_mark_b |= m_b_mark.is_marked(premise);
 | 
				
			||||||
                    need_to_mark_h = need_to_mark_h || m_h_mark.is_marked(premise);
 | 
					                need_to_mark_h |= m_h_mark.is_marked(premise);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // if current node is application of lemma, we know that all hypothesis are removed
 | 
					            // if current node is application of a lemma, then all
 | 
				
			||||||
                if(currentNode->get_decl_kind() == PR_LEMMA)
 | 
					            // active hypotheses are removed
 | 
				
			||||||
                {
 | 
					            if(cur->get_decl_kind() == PR_LEMMA) need_to_mark_h = false;
 | 
				
			||||||
                    need_to_mark_h = false;
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            // save results
 | 
					            // save results
 | 
				
			||||||
                m_a_mark.mark(currentNode, need_to_mark_a);
 | 
					            m_a_mark.mark(cur, need_to_mark_a);
 | 
				
			||||||
                m_b_mark.mark(currentNode, need_to_mark_b);
 | 
					            m_b_mark.mark(cur, need_to_mark_b);
 | 
				
			||||||
                m_h_mark.mark(currentNode, need_to_mark_h);
 | 
					            m_h_mark.mark(cur, need_to_mark_h);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    bool iuc_proof::is_a_marked(proof* p)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return m_a_mark.is_marked(p);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    bool iuc_proof::is_b_marked(proof* p)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return m_b_mark.is_marked(p);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    bool iuc_proof::is_h_marked(proof* p)
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        return m_h_mark.is_marked(p);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /*
 | 
					 | 
				
			||||||
     * ====================================
 | 
					 | 
				
			||||||
     * methods for dot printing
 | 
					 | 
				
			||||||
     * ====================================
 | 
					 | 
				
			||||||
     */
 | 
					 | 
				
			||||||
    void iuc_proof::pp_dot()
 | 
					 | 
				
			||||||
    {
 | 
					 | 
				
			||||||
        pp_proof_dot(m, m_pr, this);
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
 * ====================================
 | 
					 * ====================================
 | 
				
			||||||
 * statistics
 | 
					 * statistics
 | 
				
			||||||
 * ====================================
 | 
					 * ====================================
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void iuc_proof::print_farkas_stats()
 | 
					// debug method
 | 
				
			||||||
 | 
					void iuc_proof::dump_farkas_stats()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
        unsigned farkas_counter = 0;
 | 
					    unsigned fl_total = 0;
 | 
				
			||||||
        unsigned farkas_counter2 = 0;
 | 
					    unsigned fl_lowcut = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        proof_post_order it3(m_pr, m);
 | 
					    proof_post_order it(m_pr, m);
 | 
				
			||||||
        while (it3.hasNext())
 | 
					    while (it.hasNext())
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
            proof* currentNode = it3.next();
 | 
					        proof* cur = it.next();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // if node is theory lemma
 | 
					        // if node is theory lemma
 | 
				
			||||||
            if (is_farkas_lemma(m, currentNode))
 | 
					        if (is_farkas_lemma(m, cur))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
                farkas_counter++;
 | 
					            fl_total++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // check whether farkas lemma is to be interpolated (could potentially miss farkas lemmas, which are interpolated, because we potentially don't want to use the lowest cut)
 | 
					            // check whether farkas lemma is to be interpolated (could
 | 
				
			||||||
 | 
					            // potentially miss farkas lemmas, which are interpolated,
 | 
				
			||||||
 | 
					            // because we potentially don't want to use the lowest
 | 
				
			||||||
 | 
					            // cut)
 | 
				
			||||||
            bool has_blue_nonred_parent = false;
 | 
					            bool has_blue_nonred_parent = false;
 | 
				
			||||||
                for (unsigned i = 0; i < m.get_num_parents(currentNode); ++i)
 | 
					            for (unsigned i = 0; i < m.get_num_parents(cur); ++i) {
 | 
				
			||||||
                {
 | 
					                proof* premise = to_app(cur->get_arg(i));
 | 
				
			||||||
                    proof* premise = to_app(currentNode->get_arg(i));
 | 
					                if (!is_a_marked(premise) && is_b_marked(premise)) {
 | 
				
			||||||
                    if (!is_a_marked(premise) && is_b_marked(premise))
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                    has_blue_nonred_parent = true;
 | 
					                    has_blue_nonred_parent = true;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
                if (has_blue_nonred_parent && is_a_marked(currentNode))
 | 
					
 | 
				
			||||||
 | 
					            if (has_blue_nonred_parent && is_a_marked(cur))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                    SASSERT(is_b_marked(currentNode));
 | 
					                SASSERT(is_b_marked(cur));
 | 
				
			||||||
                    farkas_counter2++;
 | 
					                fl_lowcut++;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        verbose_stream() << "\nThis proof contains " << farkas_counter << " Farkas lemmas. " << farkas_counter2 << " Farkas lemmas participate in the lowest cut\n";
 | 
					    IF_VERBOSE(1, verbose_stream()
 | 
				
			||||||
 | 
					               << "\n total farkas lemmas " << fl_total
 | 
				
			||||||
 | 
					               << " farkas lemmas in lowest cut " << fl_lowcut << "\n";);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,35 +8,34 @@ namespace spacer {
 | 
				
			||||||
typedef obj_hashtable<func_decl> func_decl_set;
 | 
					typedef obj_hashtable<func_decl> func_decl_set;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*
 | 
					/*
 | 
				
			||||||
     * an iuc_proof is a proof together with information of the coloring of the axioms.
 | 
					 * An iuc_proof is a proof together with information of the
 | 
				
			||||||
 | 
					 * coloring of the axioms.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
class iuc_proof
 | 
					class iuc_proof
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        iuc_proof(ast_manager& m, proof* pr, expr_set& b_conjuncts);
 | 
					    // Constructs an iuc_proof given an ast_manager, a proof, and a set of
 | 
				
			||||||
 | 
					    // literals core_lits that might be included in the unsat core
 | 
				
			||||||
 | 
					    iuc_proof(ast_manager& m, proof* pr, expr_set& core_lits);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        proof* get();
 | 
					    // returns the proof object
 | 
				
			||||||
 | 
					    proof* get() {return m_pr.get();}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /*
 | 
					    // returns true if all uninterpreted symbols of e are from the core literals
 | 
				
			||||||
         * returns whether symbol contains only symbols which occur in B.
 | 
					    // requires that m_core_symbols has already been computed
 | 
				
			||||||
         */
 | 
					    bool is_core_pure(expr* e) const;
 | 
				
			||||||
        bool only_contains_symbols_b(expr* expr) const;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        bool is_a_marked(proof* p);
 | 
					    bool is_a_marked(proof* p) {return m_a_mark.is_marked(p);}
 | 
				
			||||||
        bool is_b_marked(proof* p);
 | 
					    bool is_b_marked(proof* p) {return m_b_mark.is_marked(p);}
 | 
				
			||||||
        bool is_h_marked(proof* p);
 | 
					    bool is_h_marked(proof* p) {return m_h_mark.is_marked(p);}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        bool is_b_pure (proof *p)
 | 
					    bool is_b_pure (proof *p) {
 | 
				
			||||||
        {return !is_h_marked (p) && only_contains_symbols_b (m.get_fact (p));}
 | 
					        return !is_h_marked (p) && is_core_pure(m.get_fact (p));
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        /*
 | 
					    // debug method
 | 
				
			||||||
         * print dot-representation to file proof.dot
 | 
					    void dump_farkas_stats();
 | 
				
			||||||
         * use Graphviz's dot with option -Tpdf to convert dot-representation into pdf
 | 
					 | 
				
			||||||
         */
 | 
					 | 
				
			||||||
        void pp_dot();
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        void print_farkas_stats();
 | 
					 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
    ast_manager& m;
 | 
					    ast_manager& m;
 | 
				
			||||||
    proof_ref m_pr;
 | 
					    proof_ref m_pr;
 | 
				
			||||||
| 
						 | 
					@ -45,18 +44,15 @@ namespace spacer {
 | 
				
			||||||
    ast_mark m_b_mark;
 | 
					    ast_mark m_b_mark;
 | 
				
			||||||
    ast_mark m_h_mark;
 | 
					    ast_mark m_h_mark;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        func_decl_set m_symbols_b; // symbols, which occur in any b-asserted formula
 | 
					    // symbols that occur in any literals in the core
 | 
				
			||||||
 | 
					    func_decl_set m_core_symbols;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // collect symbols occuring in B
 | 
					    // collect symbols occuring in B (the core)
 | 
				
			||||||
        void collect_symbols_b(expr_set& b_conjuncts);
 | 
					    void collect_core_symbols(expr_set& core_lits);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // compute for each formula of the proof whether it derives from A and whether it derives from B
 | 
					    // compute for each formula of the proof whether it derives
 | 
				
			||||||
        void compute_marks(expr_set& b_conjuncts);
 | 
					    // from A or from B
 | 
				
			||||||
        
 | 
					    void compute_marks(expr_set& core_lits);
 | 
				
			||||||
        void pp_dot_to_stream(std::ofstream& dotstream);
 | 
					 | 
				
			||||||
        std::string escape_dot(const std::string &s);
 | 
					 | 
				
			||||||
        
 | 
					 | 
				
			||||||
        void post_process_dot(std::string dot_filepath, std::ofstream& dotstream);
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -289,7 +289,7 @@ void iuc_solver::get_iuc(expr_ref_vector &core)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                iuc_proof iuc_before(m, res.get(), B);
 | 
					                iuc_proof iuc_before(m, res.get(), B);
 | 
				
			||||||
                verbose_stream() << "\nStats before transformation:";
 | 
					                verbose_stream() << "\nStats before transformation:";
 | 
				
			||||||
                iuc_before.print_farkas_stats();
 | 
					                iuc_before.dump_farkas_stats();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            proof_utils::reduce_hypotheses(res);
 | 
					            proof_utils::reduce_hypotheses(res);
 | 
				
			||||||
| 
						 | 
					@ -299,7 +299,7 @@ void iuc_solver::get_iuc(expr_ref_vector &core)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                iuc_proof iuc_after(m, res.get(), B);
 | 
					                iuc_proof iuc_after(m, res.get(), B);
 | 
				
			||||||
                verbose_stream() << "Stats after transformation:";
 | 
					                verbose_stream() << "Stats after transformation:";
 | 
				
			||||||
                iuc_after.print_farkas_stats();
 | 
					                iuc_after.dump_farkas_stats();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else // -- new hypothesis reducer
 | 
					        else // -- new hypothesis reducer
 | 
				
			||||||
| 
						 | 
					@ -309,7 +309,7 @@ void iuc_solver::get_iuc(expr_ref_vector &core)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                iuc_proof iuc_before(m, res.get(), B);
 | 
					                iuc_proof iuc_before(m, res.get(), B);
 | 
				
			||||||
                verbose_stream() << "\nStats before transformation:";
 | 
					                verbose_stream() << "\nStats before transformation:";
 | 
				
			||||||
                iuc_before.print_farkas_stats();
 | 
					                iuc_before.dump_farkas_stats();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            theory_axiom_reducer ta_reducer(m);
 | 
					            theory_axiom_reducer ta_reducer(m);
 | 
				
			||||||
| 
						 | 
					@ -324,7 +324,7 @@ void iuc_solver::get_iuc(expr_ref_vector &core)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                iuc_proof iuc_after(m, res.get(), B);
 | 
					                iuc_proof iuc_after(m, res.get(), B);
 | 
				
			||||||
                verbose_stream() << "Stats after transformation:";
 | 
					                verbose_stream() << "Stats after transformation:";
 | 
				
			||||||
                iuc_after.print_farkas_stats();
 | 
					                iuc_after.dump_farkas_stats();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -331,11 +331,13 @@ void unsat_core_plugin_farkas_lemma::compute_linear_combination(const vector<rat
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    SASSERT(!m_learner.m_pr.is_a_marked(premise));
 | 
					                    SASSERT(!m_learner.m_pr.is_a_marked(premise));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                    if (m_learner.m_pr.only_contains_symbols_b(m_learner.m.get_fact(premise)) && !m_learner.m_pr.is_h_marked(premise))
 | 
					                    if (m_learner.m_pr.is_b_pure(premise))
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        rational coefficient;
 | 
					                        rational coefficient;
 | 
				
			||||||
                        VERIFY(params[i].is_rational(coefficient));
 | 
					                        VERIFY(params[i].is_rational(coefficient));
 | 
				
			||||||
                        linear_combination.push_back(std::make_pair(to_app(m_learner.m.get_fact(premise)), abs(coefficient)));
 | 
					                        linear_combination.push_back
 | 
				
			||||||
 | 
					                            (std::make_pair(to_app(m_learner.m.get_fact(premise)),
 | 
				
			||||||
 | 
					                                            abs(coefficient)));
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    else
 | 
					                    else
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue