Project

General

Profile

Revision f4050bef

View differences:

src/compiler_stages.ml
87 87
  let computed_clocks_env = clock_decls clock_env prog in
88 88

  
89 89
  (* Registering and checking machine types *)
90
  Machine_types.load prog;
90
  if Machine_types.is_active then Machine_types.load prog;
91 91
  
92 92

  
93 93
  (* Generating a .lusi header file only *)
src/features/machine_types/machine_types.ml
38 38

  
39 39
*)
40 40
open LustreSpec
41

  
42
let is_active = false
41 43
  
42 44
let keyword = ["machine_types"]
43 45

  
......
434 436
  let env, vars =
435 437
    Hashtbl.fold (fun vdecl machine_type (env, vds) ->
436 438
      if vdecl.var_parent_nodeid = Some nd.node_id then (
437
	(* Format.eprintf "Adding variable %a to the environement@." Printers.pp_var vdecl; *)
439
	 (* Format.eprintf "Adding variable %a to the environement@.@?" Printers.pp_var vdecl;  *)
438 440
	let env = Env.add_value env vdecl.var_id machine_type in
439 441
	env, vdecl::vds
440 442
      )
src/normalization.ml
170 170
	  mkeq expr.expr_loc (List.map (fun v -> v.var_id) new_aliases, expr)
171 171
	in
172 172
	(* Typing and Registering machine type *) 
173
	let _ = Machine_types.type_def node new_aliases expr  in
173
	let _ = if Machine_types.is_active then Machine_types.type_def node new_aliases expr  in
174 174
	(new_def::defs, new_aliases@vars), replace_expr new_aliases expr
175 175
      else
176 176
	(defs, vars), expr
......
468 468

  
469 469
  let new_annots =
470 470
    List.fold_left (fun annots v ->
471
      if Machine_types.is_exportable v then
471
      if Machine_types.is_active && Machine_types.is_exportable v then
472 472
	let typ = Machine_types.get_specified_type v in
473 473
  	let typ_name = Machine_types.type_name typ in
474 474

  
src/scheduling.ml
186 186
  List.fold_right (
187 187
    fun top_decl (accu_prog, sch_map)  ->
188 188
      match top_decl.top_decl_desc with
189
	| Node nd -> 
190
	  let report = schedule_node nd in
191
	  {top_decl with top_decl_desc = Node report.node}::accu_prog, 
192
	  IMap.add nd.node_id report sch_map
189
      | Node nd ->
190
	let report = schedule_node nd in
191
	{top_decl with top_decl_desc = Node report.node}::accu_prog, 
192
	IMap.add nd.node_id report sch_map
193 193
	| _ -> top_decl::accu_prog, sch_map
194 194
    ) 
195 195
    prog

Also available in: Unified diff