20
20
#include " ic3_engine.h"
21
21
#include " liveness_to_safety.h"
22
22
#include " neural_liveness.h"
23
+ #include " output_file.h"
23
24
#include " property_checker.h"
24
25
#include " random_traces.h"
25
26
#include " ranking_function.h"
@@ -274,9 +275,11 @@ int ebmc_parse_optionst::doit()
274
275
netlistt netlist;
275
276
if (ebmc_base.make_netlist (netlist))
276
277
return 1 ;
277
- std::cout << " digraph netlist {\n " ;
278
- netlist.output_dot (std::cout);
279
- std::cout << " }\n " ;
278
+ auto filename = cmdline.isset (" outfile" ) ? cmdline.get_value (" outfile" ) : " -" ;
279
+ output_filet outfile{filename};
280
+ outfile.stream () << " digraph netlist {\n " ;
281
+ netlist.output_dot (outfile.stream ());
282
+ outfile.stream () << " }\n " ;
280
283
return 0 ;
281
284
}
282
285
@@ -285,11 +288,13 @@ int ebmc_parse_optionst::doit()
285
288
netlistt netlist;
286
289
if (ebmc_base.make_netlist (netlist))
287
290
return 1 ;
288
- std::cout << " -- Generated by EBMC " << EBMC_VERSION << ' \n ' ;
289
- std::cout << " -- Generated from "
291
+ auto filename = cmdline.isset (" outfile" ) ? cmdline.get_value (" outfile" ) : " -" ;
292
+ output_filet outfile{filename};
293
+ outfile.stream () << " -- Generated by EBMC " << EBMC_VERSION << ' \n ' ;
294
+ outfile.stream () << " -- Generated from "
290
295
<< ebmc_base.transition_system .main_symbol ->name << ' \n ' ;
291
- std::cout << ' \n ' ;
292
- netlist.output_smv (std::cout );
296
+ outfile. stream () << ' \n ' ;
297
+ netlist.output_smv (outfile. stream () );
293
298
return 0 ;
294
299
}
295
300
0 commit comments