Project

General

Profile

Revision e135421f src/main_lustre_compiler.ml

View differences:

src/main_lustre_compiler.ml
33 33
let check_stateless_decls decls =
34 34
  report ~level:1 (fun fmt -> fprintf fmt ".. checking stateless/stateful status@,@?");
35 35
  try
36
    List.iter (fun td -> ignore (Corelang.check_stateless_node td)) decls
37
  with (Corelang.Error (loc, err)) as exc ->
36
    Stateless.check_prog decls
37
  with (Stateless.Error (loc, err)) as exc ->
38 38
    Format.eprintf "Stateless status error at loc %a: %a@]@."
39 39
      Location.pp_loc loc
40
      Corelang.pp_error err;
40
      Stateless.pp_error err;
41 41
    raise exc
42 42

  
43 43
let type_decls env decls =  
......
208 208
      Typing.uneval_prog_generics prog;
209 209
      (* checking clocks compatibility with computed clocks*)
210 210
      Clock_calculus.check_env_compat header declared_clocks_env computed_clocks_env;
211
      Clock_calculus.uneval_prog_generics prog
211
      Clock_calculus.uneval_prog_generics prog;
212
      (* checking stateless status compatibility *)
213
      Stateless.check_compat header
212 214
    with Sys_error _ -> ( 
213 215
      (* Printing lusi file is necessary *)
214 216
      report ~level:1 
......
229 231
      Format.eprintf "Clock mismatch between computed clock and declared clock in lustre interface file: %a@]@."
230 232
	Clocks.pp_error err;
231 233
      raise exc
234
    | Stateless.Error (loc, err) as exc ->
235
      Format.eprintf "Stateless status mismatch between defined status and declared status in lustre interface file: %a@]@."
236
	Stateless.pp_error err;
237
      raise exc
232 238
  in
233 239

  
234 240
  (* Computes and stores generic calls for each node,

Also available in: Unified diff