Project

General

Profile

Revision a1daa793 src/main_lustre_compiler.ml

View differences:

src/main_lustre_compiler.ml
98 98
  (* Removing automata *)
99 99
  let prog = Automata.expand_decls prog in
100 100

  
101
  Log.report ~level:4 (fun fmt -> fprintf fmt "After automata expansion:@.@[<v 2>@ %a@]@," Printers.pp_prog prog);
102

  
101 103
  (* Importing source *)
102 104
  let _ = Modules.load_program ISet.empty prog in
103 105

  
......
230 232
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. machines generation@,");
231 233
  let machine_code = Machine_code.translate_prog prog node_schs in
232 234

  
235
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
236
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
237
  machine_code);
238

  
233 239
  (* Optimize machine code *)
234 240
  let machine_code =
235 241
    if !Options.optimization >= 4 && !Options.output <> "horn" then
......
241 247
      machine_code
242 248
  in
243 249

  
244
  Log.report ~level:2 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
245
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
246
  machine_code);
247

  
248 250
  (* Optimize machine code *)
249 251
  let machine_code =
250 252
    if !Options.optimization >= 2 && !Options.output <> "horn" then
......
266 268
      machine_code
267 269
  in
268 270

  
269

  
270
  Log.report ~level:3 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
271
  (Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
272
  machine_code);
271
  if !Options.optimization >= 2 then
272
    begin
273
      Log.report ~level:3 (fun fmt -> fprintf fmt "@[<v 2>@ %a@]@,"
274
	(Utils.fprintf_list ~sep:"@ " Machine_code.pp_machine)
275
	machine_code);
276
    end;
273 277

  
274 278
  (* Printing code *)
275 279
  let basename    =  Filename.basename basename in

Also available in: Unified diff