Project

General

Profile

« Previous | Next » 

Revision 2a4992a1

Added by Pierre-Loïc Garoche almost 6 years ago

[lustresf] Some progress: automaton compiles but not when preprocessed

View differences:

src/tools/stateflow/sf_sem.ml
29 29
(* Main *)
30 30
    
31 31
let options = [
32
  "-verbose", Arg.Set_int Options.verbose_level, "changes verbose \x1b[4mlevel\x1b[0m <default: 1>";
32 33
  "-model", Arg.String set_model, "model in {simple, stopwatch} (default: simple)";
33 34
  (* "-eval", Arg.Int set_trace_run_mode, "execute the model on trace <int>"; *)
34 35
  (* "-eval-mode", Arg.String set_eval_mode, "select evaluator: cps"; *)
......
73 74
     Options.print_dec_types := true;
74 75
     Format.printf "%a@." Printers.pp_prog prog;
75 76

  
76
     let prog, deps = Main_lustre_compiler.stage1 prog "" "" in
77

  
77
     let auto_file = "sf_gen_test_auto.lus" in (* Could be changed *)
78
     let auto_out = open_out auto_file in
79
     let auto_fmt = Format.formatter_of_out_channel auto_out in
80
     Format.fprintf auto_fmt "%a@." Printers.pp_prog prog;
78 81
     
82
     let prog, deps = Compiler_stages.stage1 prog "" "" in
83

  
84
    
79 85
     (* (\* Importing source *\) *)
80 86
     (* let _ = Modules.load_program Utils.ISet.empty prog in *)
81 87

  
......
89 95
     (* (\* Clock calculus *\) *)
90 96
     (* let computed_clocks_env = Compiler_common.clock_decls clock_env prog in *)
91 97

  
92
     Format.printf "%a@." Printers.pp_prog prog
98
     Format.printf "%a@." Printers.pp_prog prog;
99
     let noauto_file = "sf_gen_test_noauto.lus" in (* Could be changed *)
100
     let noauto_out = open_out noauto_file in
101
     let noauto_fmt = Format.formatter_of_out_channel noauto_out in
102
     Format.fprintf noauto_fmt "%a@." Printers.pp_prog prog
93 103

  
94 104

  
95 105
  
106
(* Local Variables: *)
107
(* compile-command: "make -C ../.. lustresf" *)
108
(* End: *)

Also available in: Unified diff