1111
1212#include " bmc.h"
1313
14- #include < iostream>
15-
1614#include < util/time_stopping.h>
1715#include < util/xml.h>
1816#include < util/xml_expr.h>
@@ -185,10 +183,6 @@ void bmc_covert::satisfying_assignment()
185183 goto_trace.steps .erase (++s_it1, goto_trace.steps .end ());
186184 break ;
187185 }
188-
189- #if 0
190- show_goto_trace(std::cout, bmc.ns, test.goto_trace);
191- #endif
192186}
193187
194188bool bmc_covert::operator ()()
@@ -221,8 +215,6 @@ bool bmc_covert::operator()()
221215
222216 bmc.do_conversion ();
223217
224- // bmc.equation.output(std::cout);
225-
226218 // get the conditions for these goals from formula
227219 // collect all 'instances' of the goals
228220 for (auto it = bmc.equation .SSA_steps .begin ();
@@ -278,26 +270,25 @@ bool bmc_covert::operator()()
278270 {
279271 case ui_message_handlert::uit::PLAIN:
280272 {
281- status () << " \n ** coverage results:" << eom;
273+ result () << " \n ** coverage results:" << eom;
282274
283275 for (const auto &g : goal_map)
284276 {
285277 const goalt &goal=g.second ;
286278
287- status () << " [" << g.first << " ]" ;
279+ result () << " [" << g.first << " ]" ;
288280
289281 if (goal.source_location .is_not_nil ())
290- status () << ' ' << goal.source_location ;
282+ result () << ' ' << goal.source_location ;
291283
292284 if (!goal.description .empty ())
293- status () << ' ' << goal.description ;
285+ result () << ' ' << goal.description ;
294286
295- status () << " : " << (goal.satisfied ?" SATISFIED" :" FAILED" )
296- << eom ;
287+ result () << " : " << (goal.satisfied ?" SATISFIED" :" FAILED" )
288+ << ' \n ' ;
297289 }
298290
299- status () << ' \n ' ;
300-
291+ result () << eom;
301292 break ;
302293 }
303294
@@ -315,7 +306,7 @@ bool bmc_covert::operator()()
315306 if (goal.source_location .is_not_nil ())
316307 xml_result.new_element ()=xml (goal.source_location );
317308
318- std::cout << xml_result << " \n " ;
309+ result () << xml_result;
319310 }
320311
321312 for (const auto &test : tests)
@@ -348,7 +339,7 @@ bool bmc_covert::operator()()
348339 xml_goal.set_attribute (" id" , id2string (goal_id));
349340 }
350341
351- std::cout << xml_result << " \n " ;
342+ result () << xml_result;
352343 }
353344 break ;
354345 }
@@ -404,7 +395,8 @@ bool bmc_covert::operator()()
404395 goal_refs.push_back (json_stringt (id2string (goal_id)));
405396 }
406397 }
407- std::cout << " ,\n " << json_result;
398+
399+ result () << json_result;
408400 break ;
409401 }
410402 }
@@ -422,10 +414,12 @@ bool bmc_covert::operator()()
422414
423415 if (bmc.ui ==ui_message_handlert::uit::PLAIN)
424416 {
425- std::cout << " Test suite:" << ' \n ' ;
417+ result () << " Test suite:" << ' \n ' ;
426418
427419 for (const auto &test : tests)
428- std::cout << get_test (test.goto_trace ) << ' \n ' ;
420+ result () << get_test (test.goto_trace ) << ' \n ' ;
421+
422+ result () << eom;
429423 }
430424
431425 return false ;
0 commit comments