3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-04 13:21:22 +00:00

fix spacing, cast to Bool

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2016-09-06 20:18:31 -07:00
parent 520f8fc60e
commit 2d9dced1c7
2 changed files with 60 additions and 58 deletions

View file

@ -122,6 +122,13 @@ namespace z3 {
unsat, sat, unknown unsat, sat, unknown
}; };
inline check_result to_check_result(Z3_lbool l) {
if (l == Z3_L_TRUE) return sat;
else if (l == Z3_L_FALSE) return unsat;
return unknown;
}
/** /**
\brief A Context manages all other Z3 objects, global configuration options, etc. \brief A Context manages all other Z3 objects, global configuration options, etc.
*/ */
@ -1620,7 +1627,7 @@ namespace z3 {
// for function f. // for function f.
bool has_interp(func_decl f) const { bool has_interp(func_decl f) const {
check_context(*this, f); check_context(*this, f);
return Z3_model_has_interp(ctx(), m_model, f); return 0 != Z3_model_has_interp(ctx(), m_model, f);
} }
friend std::ostream & operator<<(std::ostream & out, model const & m); friend std::ostream & operator<<(std::ostream & out, model const & m);
@ -1664,11 +1671,6 @@ namespace z3 {
return out; return out;
} }
inline check_result to_check_result(Z3_lbool l) {
if (l == Z3_L_TRUE) return sat;
else if (l == Z3_L_FALSE) return unsat;
return unknown;
}
class solver : public object { class solver : public object {
Z3_solver m_solver; Z3_solver m_solver;

View file

@ -216,7 +216,7 @@ namespace smt {
void theory_arith<Ext>::propagate_cheap_eq(unsigned rid) { void theory_arith<Ext>::propagate_cheap_eq(unsigned rid) {
if (!propagate_eqs()) if (!propagate_eqs())
return; return;
TRACE("arith_eq", tout << "checking if row " << rid << " can propagate equality.\n"; TRACE("arith_eq_verbose", tout << "checking if row " << rid << " can propagate equality.\n";
display_row_info(tout, rid);); display_row_info(tout, rid););
row const & r = m_rows[rid]; row const & r = m_rows[rid];
theory_var x; theory_var x;