module Worklist: sig end
This module implements a worklist.
type 'a
t
val empty : unit -> 'a t
val clear : 'a t -> unit
val is_empty : 'a t -> bool
is_empty w
returns true
if and only if w
contains no elements,
otherwise it returns false
.val mem : 'a t -> 'a -> bool
mem w x
returns true
if and only if w
contains x
, otherwise
it returns false
.val choose : 'a t -> 'a
val remove : 'a t -> 'a -> unit
val add : 'a t -> 'a list -> unit
add w l
adds every element of list l
to the worklist w
.val extract : 'a t -> 'a
extract w
extracts and removes an element from the worklist. The
chosen element is returned. It is a combination of the functions
Worklist.choose
and Worklist.remove
.val single : 'a -> 'a t
single x
returns a worklist containing only the element x
.val union : 'a t -> 'a t -> unit
union w1 w2
adds all elements of worklist w2
to worklist
w1
.