12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061openBatteries;;openPds_reachability_work;;(** This module type describes the interface for a work collection. *)moduletypeWork_collection=sig(* The module defining the work type. *)moduleW:Work_type(** The type of a work collection. *)typework_collection(** An equality test for work collections. *)valequal_work_collection:work_collection->work_collection->bool(** A comparator for work collections. *)valcompare_work_collection:work_collection->work_collection->int(** A pretty-printer for work collections. *)valpp_work_collection:Format.formatter->work_collection->unit(** A conversion from work collections to strings. *)valshow_work_collection:work_collection->string(** An empty work collection. *)valempty:work_collection(** Adds a work unit to a work collection. *)valoffer:W.t->work_collection->work_collection(** Extracts a work unit from a work collection. The only guaratees made by
this routine are as follows:
- Each offered work element can be taken exactly once.
- A work element is always provided unless the collection is empty.
In particular, there are no guarantees made about the order in which the
offered elements are taken.
*)valtake:work_collection->work_collection*W.toption(** Determines if a work collection is empty. *)valis_empty:work_collection->bool(** Determines the number of elements to be taken from a given work
collection. *)valsize:work_collection->int(** Enumerates the elements in a work collection in the order in which they
would be taken. *)valenum:work_collection->W.tEnum.t(** Exports a work collection as JSON. *)valto_yojson:work_collection->Yojson.Safe.tend;;(** This module type describes a work collection implementation. Such an
implementation will, given a work type, produce a work collection. *)moduletypeWork_collection_template=functor(W:Work_type)->Work_collectionwithmoduleW=W