Project

General

Profile

Revision 3d04f75e src/main_lustre_compiler.ml

View differences:

src/main_lustre_compiler.ml
226 226
    else
227 227
      prog
228 228
  in
229

  
230
  (* Post-treatment of normaized code specific to backend *)
231
  let prog = 
232
    match !Options.output with
233
    | "riny" -> prog (* TODO: eliminate through inlining bool variables and remove them *)
234
    | _ -> prog
235
  in
236

  
229 237
  (* DFS with modular code generation *)
230 238
  Log.report ~level:1 (fun fmt -> fprintf fmt ".. machines generation@,");
231 239
  let machine_code = Machine_code.translate_prog prog node_schs in
......
320 328
	Printers.pp_prog fmt prog;
321 329
(*	Lustre_backend.translate fmt basename normalized_prog machine_code *)
322 330
	()
331

  
332
      end
333
    | "riny"  ->       
334
      begin
335
	let source_file = destname ^ ".riny" in (* Could be changed *)
336
	let source_out = open_out source_file in
337
	let fmt = formatter_of_out_channel source_out in
338
	(* Printers.pp_prog fmt prog; *)
339
	Riny_backend.translate fmt basename prog machine_code;
340
	()
341

  
323 342
      end
324 343

  
325 344
    | _ -> assert false

Also available in: Unified diff