Project

General

Profile

Revision 3769b712 src/tools/stateflow/sf_sem.ml

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
  "-verbose", Arg.Set_int Lustrec.Options.verbose_level, "changes verbose \x1b[4mlevel\x1b[0m <default: 1>";
33 33
  "-model", Arg.String set_model, "model in {simple, stopwatch} (default: simple)";
34 34
  (* "-eval", Arg.Int set_trace_run_mode, "execute the model on trace <int>"; *)
35 35
  (* "-eval-mode", Arg.String set_eval_mode, "select evaluator: cps"; *)
......
40 40

  
41 41
let usage =
42 42
  "lustresf [JSON file] takes as input a stateflow model in the JSON format and a backend.\n"^
43
    "Backends are eother the C code generator or the lustre code generator."
43
    "Backends are either the C code generator or the lustre code generator."
44 44

  
45 45
    
46 46
let _ =
......
73 73
     end) in
74 74
     let module Sem = CPS.Semantics (T) (Model) in
75 75
     let prog = Sem.code_gen modularmode in
76
     Options.print_dec_types := true;
77
     Format.printf "%a@." Printers.pp_prog prog;
76
     Lustrec.Options.print_dec_types := true;
77
     Format.printf "%a@." Lustrec.Printers.pp_prog prog;
78 78
     
79 79
     let auto_file = "sf_gen_test_auto.lus" in (* Could be changed *)
80 80
     let auto_out = open_out auto_file in
81 81
     let auto_fmt = Format.formatter_of_out_channel auto_out in
82
     Format.fprintf auto_fmt "%a@." Printers.pp_prog prog;
82
     Format.fprintf auto_fmt "%a@." Lustrec.Printers.pp_prog prog;
83 83

  
84
     let params = Backends.get_normalization_params () in
84
     let params = Lustrec.Backends.get_normalization_params () in
85 85
     let prog, deps = Compiler_stages.stage1 params prog "" "" ".lus" in
86 86

  
87 87

  
88
     Options.print_dec_types := false;
89
     Format.printf "%a@." Printers.pp_prog prog;
88
     Lustrec.Options.print_dec_types := false;
89
     Format.printf "%a@." Lustrec.Printers.pp_prog prog;
90 90
     let noauto_file = "sf_gen_test_noauto.lus" in (* Could be changed *)
91 91
     let noauto_out = open_out noauto_file in
92 92
     let noauto_fmt = Format.formatter_of_out_channel noauto_out in
93
     Format.fprintf noauto_fmt "%a@." Printers.pp_prog prog
93
     Format.fprintf noauto_fmt "%a@." Lustrec.Printers.pp_prog prog
94 94

  
95 95

  
96 96
  

Also available in: Unified diff