Project

General

Profile

Revision b616fe7a src/clock_calculus.ml

View differences:

src/clock_calculus.ml
572 572

  
573 573
(* computes clocks for node application *)
574 574
and clock_appl env f args clock_reset loc =
575
 let args = expr_list_of_expr args in
576
  if Basic_library.is_internal_fun f && List.exists is_tuple_expr args
577
  then
578
      let args = Utils.transpose_list (List.map expr_list_of_expr args) in
579
      Clocks.clock_of_clock_list (List.map (fun args -> clock_call env f args clock_reset loc) args)
580
  else
581
    clock_call env f args clock_reset loc
582

  
583
and clock_call env f args clock_reset loc =
575 584
  let cfun = clock_ident false env f loc in
576 585
  let cins, couts = split_arrow cfun in
577 586
  let cins = clock_list_of_clock cins in
578
  let args = expr_list_of_expr args in
579 587
  List.iter2 (clock_subtyping_arg env) args cins;
580 588
  unify_imported_clock (Some clock_reset) cfun;
581 589
  couts
......
716 724
      expr.expr_clock <- ck;
717 725
      ck
718 726
  in
719
  Log.report ~level:3 (fun fmt -> Format.fprintf fmt "Clock of expr %a: %a@." Printers.pp_expr expr Clocks.print_ck resulting_ck);
727
  Log.report ~level:4 (fun fmt -> Format.fprintf fmt "Clock of expr %a: %a@." Printers.pp_expr expr Clocks.print_ck resulting_ck);
720 728
  resulting_ck
721 729

  
722 730
let clock_of_vlist vars =

Also available in: Unified diff