Core.mli 2.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
(******************************************************************************)
(*                                                                            *)
(*                                    Fix                                     *)
(*                                                                            *)
(*                       François Pottier, Inria Paris                        *)
(*                                                                            *)
(*  Copyright Inria. All rights reserved. This file is distributed under the  *)
(*  terms of the GNU Library General Public License version 2, with a         *)
(*  special exception on linking, as described in the file LICENSE.           *)
(*                                                                            *)
(******************************************************************************)

13
open Sigs
14

15 16 17
(* [Make] constructs a solver for a type [key] that is equipped with
   an implementation of imperative maps and a type [property] that is
   equipped with [bottom], [equal], and [is_maximal] functions. *)
18 19 20 21

module Make
  (M : IMPERATIVE_MAPS)
  (P : PROPERTY)
22 23 24 25 26 27 28 29 30 31
     : SOLVER
       with type variable = M.key
        and type property = P.property

(* [ForOrderedType] is a special case of [Make] where it
   suffices to pass an ordered type [T] as an argument.
   A reference to a persistent map is used to hold the
   memoization table. *)

module ForOrderedType
32
  (T : OrderedType)
33 34 35 36 37 38 39 40 41 42
  (P : PROPERTY)
     : SOLVER
       with type variable = T.t
        and type property = P.property

(* [ForHashedType] is a special case of [Make] where it
   suffices to pass a hashed type [T] as an argument. A
   hash table is used to hold the memoization table. *)

module ForHashedType
43
  (T : HashedType)
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
  (P : PROPERTY)
     : SOLVER
       with type variable = T.t
        and type property = P.property

(* [ForType] is a special case of [Make] where it suffices
   to pass an arbitrary type [T] as an argument. A hash table
   is used to hold the memoization table. OCaml's built-in
   generic equality and hash functions are used. *)

module ForType
  (T : TYPE)
  (P : PROPERTY)
     : SOLVER
       with type variable = T.t
        and type property = P.property