mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	debug cross_nested form with new expressions
Signed-off-by: Lev Nachmanson <levnach@hotmail.com>
This commit is contained in:
		
							parent
							
								
									316a0470b1
								
							
						
					
					
						commit
						a8dd908fa0
					
				
					 4 changed files with 38 additions and 33 deletions
				
			
		| 
						 | 
				
			
			@ -268,12 +268,6 @@ public:
 | 
			
		|||
            explore_expr_on_front_elem_vars(c, front, vars);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    static std::string ch(unsigned j) {
 | 
			
		||||
        std::stringstream s;
 | 
			
		||||
        s << "v" << j;
 | 
			
		||||
        return s.str();
 | 
			
		||||
        //        return (char)('a'+j);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    std::ostream& print_front(const vector<nex**>& front, std::ostream& out) const {
 | 
			
		||||
        for (auto e : front) {
 | 
			
		||||
| 
						 | 
				
			
			@ -284,7 +278,7 @@ public:
 | 
			
		|||
    // c is the sub expressiond which is going to be changed from sum to the cross nested form
 | 
			
		||||
    // front will be explored more
 | 
			
		||||
    void explore_of_expr_on_sum_and_var(nex** c, lpvar j, vector<nex**> front) {
 | 
			
		||||
        TRACE("nla_cn", tout << "m_e=" << *m_e << "\nc=" << **c << "\nj = " << ch(j) << "\nfront="; print_front(front, tout) << "\n";);
 | 
			
		||||
        TRACE("nla_cn", tout << "m_e=" << *m_e << "\nc=" << **c << "\nj = " << nex_creator::ch(j) << "\nfront="; print_front(front, tout) << "\n";);
 | 
			
		||||
        if (!split_with_var(*c, j, front))
 | 
			
		||||
            return;
 | 
			
		||||
        TRACE("nla_cn", tout << "after split c=" << **c << "\nfront="; print_front(front, tout) << "\n";);
 | 
			
		||||
| 
						 | 
				
			
			@ -428,7 +422,7 @@ public:
 | 
			
		|||
    // it returns true if the recursion brings a cross-nested form
 | 
			
		||||
    bool split_with_var(nex*& e, lpvar j, vector<nex**> & front) {
 | 
			
		||||
        SASSERT(e->is_sum());
 | 
			
		||||
        TRACE("nla_cn", tout << "e = " << *e << ", j=" << ch(j) << "\n";);
 | 
			
		||||
        TRACE("nla_cn", tout << "e = " << *e << ", j=" << nex_creator::ch(j) << "\n";);
 | 
			
		||||
        nex_sum* a; nex * b;
 | 
			
		||||
        pre_split(to_sum(e), j, a, b);
 | 
			
		||||
        /*
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -22,7 +22,7 @@
 | 
			
		|||
namespace nla {
 | 
			
		||||
nex * nex_creator::mk_div(const nex* a, lpvar j) {
 | 
			
		||||
    SASSERT(is_simplified(a));
 | 
			
		||||
    TRACE("nla_cn_details", tout << "a=" << *a << ", v" << j << "\n";);
 | 
			
		||||
    TRACE("nla_cn_details", tout << "a=" << *a << ", " << ch(j) << "\n";);
 | 
			
		||||
    SASSERT((a->is_mul() && a->contains(j)) || (a->is_var() && to_var(a)->var() == j));
 | 
			
		||||
    if (a->is_var())
 | 
			
		||||
        return mk_scalar(rational(1));
 | 
			
		||||
| 
						 | 
				
			
			@ -391,8 +391,7 @@ nex* nex_creator::create_child_from_nex_and_coeff(nex *e,
 | 
			
		|||
            return mk_mul(mk_scalar(coeff), e);
 | 
			
		||||
        }
 | 
			
		||||
        case expr_type::SCALAR: {
 | 
			
		||||
            UNREACHABLE();
 | 
			
		||||
            return nullptr;
 | 
			
		||||
            return mk_scalar(coeff);
 | 
			
		||||
        }        
 | 
			
		||||
        case expr_type::MUL: {
 | 
			
		||||
            nex_mul * em = to_mul(e);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -57,6 +57,13 @@ class nex_creator {
 | 
			
		|||
    svector<var_weight>                          m_active_vars_weights;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    static char ch(unsigned j) {
 | 
			
		||||
        // std::stringstream s;
 | 
			
		||||
        // s << "v" << j;        
 | 
			
		||||
        //    return s.str();
 | 
			
		||||
        return (char)('a'+j);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    svector<var_weight>& active_vars_weights() { return m_active_vars_weights;}
 | 
			
		||||
    const svector<var_weight>& active_vars_weights() const { return m_active_vars_weights;}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue