Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

mlw_dty.mli 2.46 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
(**************************************************************************)
(*                                                                        *)
(*  Copyright (C) 2010-2012                                               *)
(*    François Bobot                                                      *)
(*    Jean-Christophe Filliâtre                                           *)
(*    Claude Marché                                                       *)
(*    Guillaume Melquiond                                                 *)
(*    Andrei Paskevich                                                    *)
(*                                                                        *)
(*  This software is free software; you can redistribute it and/or        *)
(*  modify it under the terms of the GNU Library General Public           *)
(*  License version 2.1, with the special exception on linking            *)
(*  described in file LICENSE.                                            *)
(*                                                                        *)
(*  This software is distributed in the hope that it will be useful,      *)
(*  but WITHOUT ANY WARRANTY; without even the implied warranty of        *)
(*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                  *)
(*                                                                        *)
(**************************************************************************)

(* destructive types for program type inference *)

open Why3
open Ident
open Ty
open Term
open Mlw_ty
open Mlw_ty.T
open Mlw_expr
30
open Mlw_module
31

32
type dreg
33
type dity
34
type dvty = dity list * dity (* A -> B -> C == ([A;B],C) *)
35

36 37
type tvars (* a set of type variables *)
val empty_tvars: tvars
38 39
val add_dity: tvars -> dity -> tvars
val add_dvty: tvars -> dvty -> tvars
40

41
val create_type_variable: unit -> dity
42
val create_user_type_variable: Ptree.ident -> dity
43
val its_app: user:bool -> itysymbol -> dity list -> dity
44 45
val ts_app: tysymbol -> dity list -> dity

46 47
val unify: dity -> dity -> unit
val unify_weak: dity -> dity -> unit (* don't unify regions *)
48

Andrei Paskevich's avatar
Andrei Paskevich committed
49 50
val ity_of_dity: ?strict:bool -> dity -> ity
val vty_of_dvty: ?strict:bool -> dvty -> vty
51 52
  (** use with care, only once unification is done *)

53
val specialize_scheme: tvars -> dvty -> dvty
54

55
val specialize_lsymbol: lsymbol -> dvty
56
val specialize_pvsymbol: pvsymbol -> dity
57 58
val specialize_psymbol: psymbol -> dvty
val specialize_plsymbol: plsymbol -> dvty
Andrei Paskevich's avatar
Andrei Paskevich committed
59
val specialize_xsymbol: xsymbol -> dity