mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 13:29:11 +00:00 
			
		
		
		
	nit
This commit is contained in:
		
							parent
							
								
									2b6dadcbc6
								
							
						
					
					
						commit
						deaad86d6a
					
				
					 2 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
					@ -2587,9 +2587,9 @@ namespace z3 {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        friend std::ostream & operator<<(std::ostream & out, model const & m);
 | 
					        friend std::ostream & operator<<(std::ostream & out, model const & m);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        std::string to_string() const { return std::string(Z3_model_to_string(ctx(), m_model)); }
 | 
					        std::string to_string() const { return m_model ? std::string(Z3_model_to_string(ctx(), m_model)) : "null"; }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
    inline std::ostream & operator<<(std::ostream & out, model const & m) { out << Z3_model_to_string(m.ctx(), m); return out; }
 | 
					    inline std::ostream & operator<<(std::ostream & out, model const & m) { return out << m.to_string(); }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    class stats : public object {
 | 
					    class stats : public object {
 | 
				
			||||||
        Z3_stats m_stats;
 | 
					        Z3_stats m_stats;
 | 
				
			||||||
| 
						 | 
					@ -3983,6 +3983,7 @@ namespace z3 {
 | 
				
			||||||
            scoped_cb _cb(p, cb);
 | 
					            scoped_cb _cb(p, cb);
 | 
				
			||||||
            expr value(p->ctx(), _value);
 | 
					            expr value(p->ctx(), _value);
 | 
				
			||||||
            expr var(p->ctx(), _var);
 | 
					            expr var(p->ctx(), _var);
 | 
				
			||||||
 | 
					            std::cout << "Fixed " << cb << "\n";
 | 
				
			||||||
            p->m_fixed_eh(var, value);
 | 
					            p->m_fixed_eh(var, value);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4150,6 +4151,7 @@ namespace z3 {
 | 
				
			||||||
            assert(cb);
 | 
					            assert(cb);
 | 
				
			||||||
            expr conseq = ctx().bool_val(false);
 | 
					            expr conseq = ctx().bool_val(false);
 | 
				
			||||||
            array<Z3_ast> _fixed(fixed);
 | 
					            array<Z3_ast> _fixed(fixed);
 | 
				
			||||||
 | 
					            std::cout << "conflict " << cb << " " << fixed << "\n";
 | 
				
			||||||
            Z3_solver_propagate_consequence(ctx(), cb, fixed.size(), _fixed.ptr(), 0, nullptr, nullptr, conseq);
 | 
					            Z3_solver_propagate_consequence(ctx(), cb, fixed.size(), _fixed.ptr(), 0, nullptr, nullptr, conseq);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -100,7 +100,7 @@ theory * theory_user_propagator::mk_fresh(context * new_ctx) {
 | 
				
			||||||
        ctx = m_fresh_eh(m_user_context, new_ctx->get_manager(), th->m_api_context);
 | 
					        ctx = m_fresh_eh(m_user_context, new_ctx->get_manager(), th->m_api_context);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    catch (...) {
 | 
					    catch (...) {
 | 
				
			||||||
      throw default_exception("Exception thrown in \"fresh\"-callback");
 | 
					        throw default_exception("Exception thrown in \"fresh\"-callback");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    th->add(ctx, m_push_eh, m_pop_eh, m_fresh_eh);
 | 
					    th->add(ctx, m_push_eh, m_pop_eh, m_fresh_eh);
 | 
				
			||||||
    if ((bool)m_fixed_eh) th->register_fixed(m_fixed_eh);
 | 
					    if ((bool)m_fixed_eh) th->register_fixed(m_fixed_eh);
 | 
				
			||||||
| 
						 | 
					@ -140,7 +140,7 @@ void theory_user_propagator::new_fixed_eh(theory_var v, expr* value, unsigned nu
 | 
				
			||||||
         m_fixed_eh(m_user_context, this, var2expr(v), value);
 | 
					         m_fixed_eh(m_user_context, this, var2expr(v), value);
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
     catch (...) {
 | 
					     catch (...) {
 | 
				
			||||||
       throw default_exception("Exception thrown in \"fixed\"-callback");
 | 
					        throw default_exception("Exception thrown in \"fixed\"-callback");
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -252,7 +252,7 @@ bool theory_user_propagator::internalize_term(app* term)  {
 | 
				
			||||||
        m_created_eh(m_user_context, this, term);
 | 
					        m_created_eh(m_user_context, this, term);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    catch (...) {
 | 
					    catch (...) {
 | 
				
			||||||
      throw default_exception("Exception thrown in \"created\"-callback");
 | 
					        throw default_exception("Exception thrown in \"created\"-callback");
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return true;
 | 
					    return true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue