Module CkTypeEffSource

TYPE/BINDING CHECK : typage

------------------------------------------------------------

Type effectif :

N.B. Pour ce qui est de l'équivalence, pour l'instant c'est un peu du luxe, vu qu'on n'a que des types simples ...

----------------------------------------------------------

pour typer les variables et les expressions

Sourcetype t =
  1. | TEFF_weight
  2. | TEFF_except
  3. | TEFF_trace
  4. | TEFF_data of basic
  5. | TEFF_list of basic
  6. | TEFF_tuple of basic list
  7. | TEFF_any of string * any_cond
  8. | TEFF_ref of basic
Sourceand any_cond = t -> t option
Sourcetype profile

pour typer les macros

GESTION DES PROFILS

Sourceval get_prof : t list -> t list -> profile

création d'un profil

Sourceval params_of_prof : profile -> t list

types des paramètres

Sourceval res_of_prof : profile -> t list

type du résultats

Sourceval split_prof : profile -> t list * t list

décomposition (param/res)

TYPES USUELS

Sourceval get_data_tuple : t list -> t
Sourceval tuple_to_data_list : t -> t list
Sourceval boolean : t
Sourceval integer : t
Sourceval real : t
Sourceval trace : t
Sourceval is_data : t -> bool
Sourceval is_data_profile : profile -> bool
Sourceval weight : t
Sourceval except : t
Sourceval ref_of : t -> t

TYPE "reference"

Sourceval lift_ref : t -> t
Sourceval is_ref : t -> bool

PROFILS USUELS on utilise les mnémo. b -> bool i -> int n -> int ou real x -> int ou real ou bool t -> trace w -> weight e -> exception

Sourceval prof_t_t : profile
Sourceval prof_tt_t : profile
Sourceval prof_it_t : profile
Sourceval prof_ti_t : profile
Sourceval prof_bt_t : profile
Sourceval prof_iit_t : profile
Sourceval prof_b_b : profile
Sourceval prof_bb_b : profile
Sourceval prof_bl_b : profile
Sourceval prof_ii_i : profile
Sourceval prof_iii_i : profile
Sourceval prof_tw_t : profile
  • trace * weight
Sourceval prof_et_t : profile
  • exception * trace
Sourceval prof_ett_t : profile
Sourceval prof_bxx_x : profile
Sourceval prof_xx_b : profile
Sourceval prof_nn_b : profile
Sourceval prof_nn_n : profile
Sourceval prof_n_n : profile

EXPRESSION DE TYPE -> TYPE EFFECTIF

Sourceval of_texp : Syntaxe.type_exp -> t

PRETTY-PRINT

Sourceval to_string : t -> string
Sourceval prof_to_string : profile -> string
Sourceval list_to_string : t list -> string

COMPATIBILITÉ DES t lifts_to x y ssi un x peut être utilisé en place d'un y en particulier eq => lifts_to

Sourceval lifts_to : t -> t -> bool

RÉSOLUTION DES profils :

Sourceval match_prof : t list -> profile -> t list