Module LogtkCache

module LogtkCache: sig .. end

Memoization caches




LogtkSignatures


module type EQ = sig .. end
module type HASH = sig .. end
module type S = sig .. end
LogtkSignature of a cache for values
module type S2 = sig .. end
LogtkSignature of a cache for pairs of values

Dummy cache (no caching)


module Dummy (X : sig
type t 
end) : S with type key = X.t
module Dummy2 (X : sig
type t 
end) (Y : sig
type t 
end) : S2 with type key1 = X.t and type key2 = Y.t

Small linear cache



This cache stores (key,value) pairs in an array, that is traversed linearily. It is therefore only reasonable for small sizes (like 5).
module Linear (X : EQ) : S  with type key = X.t
module Linear2 (X : EQ)  (Y : EQ) : S2  with type key1 = X.t and type key2 = Y.t

Hashtables that resolve collisions by replacing


module Replacing (X : HASH) : S  with type key = X.t
module Replacing2 (X : HASH)  (Y : HASH) : S2  with type key1 = X.t and type key2 = Y.t

Hashtables with Least Recently Used eviction policy


module LRU (X : HASH) : S  with type key = X.t