@@ -159,7 +159,9 @@ void smt2_incremental_decision_proceduret::ensure_handle_for_expr_defined(
159159
160160exprt smt2_incremental_decision_proceduret::handle (const exprt &expr)
161161{
162- log.debug () << " `handle` -\n " << expr.pretty (2 , 0 ) << messaget::eom;
162+ log.conditional_output (log.debug (), [&](messaget::mstreamt &debug) {
163+ debug << " `handle` -\n " << expr.pretty (2 , 0 ) << messaget::eom;
164+ });
163165 ensure_handle_for_expr_defined (expr);
164166 return expr;
165167}
@@ -182,7 +184,9 @@ static optionalt<smt_termt> get_identifier(
182184
183185exprt smt2_incremental_decision_proceduret::get (const exprt &expr) const
184186{
185- log.debug () << " `get` - \n " + expr.pretty (2 , 0 ) << messaget::eom;
187+ log.conditional_output (log.debug (), [&](messaget::mstreamt &debug) {
188+ debug << " `get` - \n " + expr.pretty (2 , 0 ) << messaget::eom;
189+ });
186190 optionalt<smt_termt> descriptor =
187191 get_identifier (expr, expression_handle_identifiers, expression_identifiers);
188192 if (!descriptor)
@@ -251,8 +255,10 @@ smt2_incremental_decision_proceduret::get_number_of_solver_calls() const
251255void smt2_incremental_decision_proceduret::set_to (const exprt &expr, bool value)
252256{
253257 PRECONDITION (can_cast_type<bool_typet>(expr.type ()));
254- log.debug () << " `set_to` (" << std::string{value ? " true" : " false" }
255- << " ) -\n " << expr.pretty (2 , 0 ) << messaget::eom;
258+ log.conditional_output (log.debug (), [&](messaget::mstreamt &debug) {
259+ debug << " `set_to` (" << std::string{value ? " true" : " false" } << " ) -\n "
260+ << expr.pretty (2 , 0 ) << messaget::eom;
261+ });
256262
257263 define_dependent_functions (expr);
258264 auto converted_term = [&]() -> smt_termt {
0 commit comments