mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	debugging #5127
This commit is contained in:
		
							parent
							
								
									e5e663e874
								
							
						
					
					
						commit
						0b0efa83ca
					
				
					 3 changed files with 23 additions and 10 deletions
				
			
		| 
						 | 
					@ -214,7 +214,7 @@ public:
 | 
				
			||||||
        unsigned j = null_lpvar;
 | 
					        unsigned j = null_lpvar;
 | 
				
			||||||
        if (!lp().find_in_fixed_tables(val(v_j), is_int(v_j), j)) 
 | 
					        if (!lp().find_in_fixed_tables(val(v_j), is_int(v_j), j)) 
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
        TRACE("cheap_eq", tout << "found j=" << j << " for v=";
 | 
					        TRACE("cheap_eq", tout << "found j = " << j << " v_j = " << v_j << " for v = ";
 | 
				
			||||||
              print(tout, v) << "\n in lp.fixed tables\n";);
 | 
					              print(tout, v) << "\n in lp.fixed tables\n";);
 | 
				
			||||||
        vector<edge> path;
 | 
					        vector<edge> path;
 | 
				
			||||||
        find_path_on_tree(path, v, m_fixed_vertex);
 | 
					        find_path_on_tree(path, v, m_fixed_vertex);
 | 
				
			||||||
| 
						 | 
					@ -281,11 +281,11 @@ public:
 | 
				
			||||||
        m_fixed_vertex_explanation = get_explanation_from_path(path);
 | 
					        m_fixed_vertex_explanation = get_explanation_from_path(path);
 | 
				
			||||||
        explain_fixed_in_row(row_index, m_fixed_vertex_explanation);
 | 
					        explain_fixed_in_row(row_index, m_fixed_vertex_explanation);
 | 
				
			||||||
        set_fixed_vertex(v);
 | 
					        set_fixed_vertex(v);
 | 
				
			||||||
        TRACE("cheap_eq", tout << "polarity switch between: v = "; print(tout , v) << "\nand u = "; print(tout, u) << "\n";);
 | 
					        TRACE("cheap_eq", 
 | 
				
			||||||
        TRACE("cheap_eq", tout << "fixed vertex explanation\n";
 | 
					              tout << "polarity switch: " << polarity << "\nv = "; print(tout , v) << "\nu = "; print(tout, u) << "\n";
 | 
				
			||||||
              for (auto p : m_fixed_vertex_explanation) {
 | 
					              tout << "fixed vertex explanation\n";
 | 
				
			||||||
                  lp().constraints().display(tout, [this](lpvar j) { return lp().get_variable_name(j);}, p.ci());
 | 
					              for (auto p : m_fixed_vertex_explanation) 
 | 
				
			||||||
              });
 | 
					                  lp().constraints().display(tout, [this](lpvar j) { return lp().get_variable_name(j);}, p.ci()););
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
| 
						 | 
					@ -379,7 +379,7 @@ public:
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    void check_for_eq_and_add_to_val_table(vertex* v,  map<mpq, const vertex*, obj_hash<mpq>, default_eq<mpq>>& table) {
 | 
					    void check_for_eq_and_add_to_val_table(vertex* v,  map<mpq, const vertex*, obj_hash<mpq>, default_eq<mpq>>& table) {
 | 
				
			||||||
        TRACE("cheap_eq", tout << "v="; print(tout, v) << "\n";);
 | 
					        TRACE("cheap_eq", tout << "v = "; print(tout, v) << "\n";);
 | 
				
			||||||
        const vertex *k; // the other vertex
 | 
					        const vertex *k; // the other vertex
 | 
				
			||||||
        if (table.find(val(v), k)) {
 | 
					        if (table.find(val(v), k)) {
 | 
				
			||||||
            TRACE("cheap_eq", tout << "found k " ; print(tout, k) << "\n";);
 | 
					            TRACE("cheap_eq", tout << "found k " ; print(tout, k) << "\n";);
 | 
				
			||||||
| 
						 | 
					@ -447,7 +447,9 @@ public:
 | 
				
			||||||
        SASSERT(j != k);
 | 
					        SASSERT(j != k);
 | 
				
			||||||
        unsigned je = lp().column_to_reported_index(j);
 | 
					        unsigned je = lp().column_to_reported_index(j);
 | 
				
			||||||
        unsigned ke = lp().column_to_reported_index(k);
 | 
					        unsigned ke = lp().column_to_reported_index(k);
 | 
				
			||||||
        TRACE("cheap_eq", tout << "reporting eq " << j << ", " << k << "\n";
 | 
					        TRACE("cheap_eq", 
 | 
				
			||||||
 | 
					              tout << "reporting eq " << j  << ", " << k << "\n";
 | 
				
			||||||
 | 
					              tout << "reported idx " << je << ", " << ke << "\n";
 | 
				
			||||||
              for (auto p : exp) {
 | 
					              for (auto p : exp) {
 | 
				
			||||||
                  lp().constraints().display(tout, [this](lpvar j) { return lp().get_variable_name(j);}, p.ci());
 | 
					                  lp().constraints().display(tout, [this](lpvar j) { return lp().get_variable_name(j);}, p.ci());
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -220,12 +220,22 @@ namespace smt {
 | 
				
			||||||
    void context::display_assignment(std::ostream & out) const {
 | 
					    void context::display_assignment(std::ostream & out) const {
 | 
				
			||||||
        if (!m_assigned_literals.empty()) {
 | 
					        if (!m_assigned_literals.empty()) {
 | 
				
			||||||
            out << "current assignment:\n";
 | 
					            out << "current assignment:\n";
 | 
				
			||||||
 | 
					            unsigned level = 0;
 | 
				
			||||||
            for (literal lit : m_assigned_literals) {
 | 
					            for (literal lit : m_assigned_literals) {
 | 
				
			||||||
                display_literal(out, lit);
 | 
					                if (level < get_assign_level(lit.var())) {
 | 
				
			||||||
 | 
					                    level = get_assign_level(lit.var());
 | 
				
			||||||
 | 
					                    out << "level " << level << "\n";
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                display_literal(out << lit << " ", lit);
 | 
				
			||||||
                if (!is_relevant(lit)) out << " n ";
 | 
					                if (!is_relevant(lit)) out << " n ";
 | 
				
			||||||
                out << ": ";
 | 
					                out << ": ";
 | 
				
			||||||
                display_verbose(out, m, 1, &lit, m_bool_var2expr.c_ptr());
 | 
					                display_verbose(out, m, 1, &lit, m_bool_var2expr.c_ptr());
 | 
				
			||||||
                out << "\n";
 | 
					                if (level > 0) {
 | 
				
			||||||
 | 
					                    auto j = get_justification(lit.var());
 | 
				
			||||||
 | 
					                    display(out << " ", j);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else 
 | 
				
			||||||
 | 
					                    out << "\n";
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2811,6 +2811,7 @@ void theory_seq::assign_eh(bool_var v, bool is_true) {
 | 
				
			||||||
    expr_ref f(m);
 | 
					    expr_ref f(m);
 | 
				
			||||||
    literal lit(v, !is_true);
 | 
					    literal lit(v, !is_true);
 | 
				
			||||||
    TRACE("seq", tout << (is_true?"":"not ") << mk_bounded_pp(e, m) << "\n";);
 | 
					    TRACE("seq", tout << (is_true?"":"not ") << mk_bounded_pp(e, m) << "\n";);
 | 
				
			||||||
 | 
					    TRACE("seq", tout << (is_true?"":"not ") << mk_bounded_pp(e, m) << " " << ctx.get_scope_level() << " " << lit << "\n";);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (m_util.str.is_prefix(e, e1, e2)) {
 | 
					    if (m_util.str.is_prefix(e, e1, e2)) {
 | 
				
			||||||
        if (is_true) {
 | 
					        if (is_true) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue