Module Computation


module Computation: sig .. end
Internal state builders. Provide ways to implement signature Project.Computation.OUTPUT without directly apply functor Project.Computation.Register. Depending on the builder, also provide some additional useful information.
Consult the Plugin Development Guide for additional details.


Useful operations


val apply_once : string ->
Project.Computation.t list ->
(unit -> unit) -> (unit -> unit) * Project.Computation.t
apply_once name dep f returns a closure applying f only once and the state internally used. name and dep are respectively the name and the dependencies of the local state created by this function. Should be used partially applied. If f raises an exception, then it is considered as not applied.

Builders



References


module type REF_INPUT = sig .. end
Signature of the stored data.
module type REF_OUTPUT = sig .. end
Output signature of Ref.
module Ref: 
functor (Data : REF_INPUT) ->
functor (Info : Signature.NAME_DPDS) -> REF_OUTPUT with type data = Data.t
module type OPTION_REF_OUTPUT = sig .. end
Output signature of OptionRef.
module OptionRef: 
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_DPDS) -> OPTION_REF_OUTPUT with type data = Data.t
Build a reference on an option.
module type LIST_REF_OUTPUT = sig .. end
Output signature of ListRef.
module ListRef: 
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_DPDS) -> LIST_REF_OUTPUT with type data = Data.t list and type data_in_list = Data.t
Build a reference on a list.

Dashtables

Dashtbl are projectified hashtbl in which each binding may have a dependency (not only the full table) and may be used as internal states. By using dashtable, you will have a very fine-grain control over the dependencies.

IMPORTANT:


module type HASHTBL = sig .. end
Sub-signature of hashtables required for building projectified hashtables and dashtables.
module type DASHTBL_OUTPUT = sig .. end
Output signature of dashtables.
module Make_Dashtbl: 
functor (H : HASHTBL) ->
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> DASHTBL_OUTPUT with type key = H.key and type data = Data.t
Build a dashtable from an implementation of hashtable, a datatype for values and usual additional information.
module Dashtbl: 
functor (Key : Hashtbl.HashedType) ->
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> DASHTBL_OUTPUT with type key = Key.t and type data = Data.t
Build a dashtable from hashable keys, a datatype for values and usual additionnal information.

Weak Hashtbl


module type WEAK_HASHTBL_OUTPUT = sig .. end
Output signature of builders of hashtables.
module Make_WeakHashtbl: 
functor (W : Weak.S) ->
functor (Data : Project.Datatype.S with type t = W.data) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> WEAK_HASHTBL_OUTPUT with type data = W.data
Build a weak hashtbl over a datatype Data from a reference implementation W.
module WeakHashtbl: 
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> WEAK_HASHTBL_OUTPUT with type data = Data.t
Build a weak hashtbl over a datatype Data by using Weak.Make provided by the ocaml standard library.
module HashconsTbl: 
functor (Data : sig
type t 
The hashconsed type
val name : string
Name of the hashconsed datatype
val equal_internal : t -> t -> bool
Equality on the datatype internally used by the built table.
val hash_internal : t -> int
Hash function for datatype internally used by the built table.
val initial_values : t list
Pre-existing values stored in the built table and shared by all the existing projects.
end) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> WEAK_HASHTBL_OUTPUT with type data = Data.t
Weak hashtbl dedicated to hashconsing.

Hashtables

IMPORTANT: that is INCORRECT to use projectified hashtables if keys have a custom rehash function (see Project.DATATYPE_OUTPUT.rehash)

module type HASHTBL_OUTPUT = sig .. end
Output signature of builders of hashtables.
module Make_Hashtbl: 
functor (H : HASHTBL) ->
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> HASHTBL_OUTPUT with type key = H.key and type data = Data.t
module Hashtbl: 
functor (Key : Hashtbl.HashedType) ->
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_SIZE_DPDS) -> HASHTBL_OUTPUT with type key = Key.t and type data = Data.t

References on a set


module type SET = sig .. end
module type SET_REF_OUTPUT = sig .. end
Output signature of builders of references on a set.
module Make_SetRef: 
functor (Set : SET) ->
functor (Data : Project.Datatype.S with type t = Set.elt) ->
functor (Info : Signature.NAME_DPDS) -> SET_REF_OUTPUT with type elt = Data.t
module SetRef: 
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_DPDS) -> SET_REF_OUTPUT with type elt = Data.t

Queue


module type QUEUE = sig .. end
module Queue: 
functor (Data : Project.Datatype.S) ->
functor (Info : Signature.NAME_DPDS) -> QUEUE with type elt = Data.t

Project itself


module Project: 
functor (Info : Signature.NAME_DPDS) -> REF_OUTPUT with type data = Project.t