Skip to content
Snippets Groups Projects
licDump.mli 2.42 KiB
Newer Older
(** Time-stamp: <modified the 29/08/2008 (at 10:15) by Erwan Jahier> *)
val string_of_node_key_rec : Eff.node_key -> string
val node_of_node_exp_eff: Eff.node_exp -> string
val string_of_const_eff : Eff.const -> string
val string_of_type_eff : Eff.type_ -> string
val string_of_type_eff_list : Eff.type_ list -> string
val type_eff_list_to_string :Eff.type_ list -> string
val type_decl: Ident.long -> Eff.type_ -> string
val const_decl: Ident.long -> Eff.const -> string
val profile_of_node_exp_eff: Eff.node_exp -> string
val string_of_var_info_eff: Eff.var_info -> string
val type_string_of_var_info_eff: Eff.var_info -> string
val string_of_slice_info_eff : Eff.slice_info -> string 
(* Dump all the aliases that were introduced during the compilation process *)
Erwan Jahier's avatar
Erwan Jahier committed
val dump_type_alias : out_channel -> unit
val dump_node_alias : out_channel -> unit
(* Remember the type of iterator calls. 

   The type of the expression "map<<+,3>>" depends on its
   context. And when translating expressions like
   "map<<map<<+,3>>,42>>", we create an alias node for
   "map<<+,3>>". But this node have an overloaded type (the same
   problem occur when iterating of polymorphic op).

   One difficulty is that we can know the type of this call only
   at the top level iterator.

   Therefore we procees in two step : 
   (1) each time we see an iterator call, we tabulate its profile
   (cf OpProfile constructor below), that migth contain some 
   type variables (well, at most one for the time being).
   (2) When we type check the expression, we know the substition
   for that type var. So we tabulate it (cf Subst constructor below).

   The problem is that the inner iterator calls are never typed check !
   (well, more precisely, EvalType.f is never called for them, besause
   they have been transformed into a node_exp_eff that is polymorphic).
   The (diry) trick I use is to store the substitution in a internal
   reference, that is uses as soon a I have to deal with a type var.
   It works because the outter iter call is treated before the inner
   ones, and because no other call to dump_node_alias is
   intertwinned...
*)
type tab_elt = 
  | OpProfile of Eff.type_ list * Eff.type_ list
  | Subst of Eff.type_
val tabulate_poly_op :  Lxm.t -> tab_elt -> unit
val poly_op_mem : Lxm.t -> bool
val poly_op_find :  Lxm.t -> tab_elt option


(* used for error msgs *)
val string_of_clock2  : Eff.clock -> string
val string_of_val_exp_eff : Eff.val_exp -> string