X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2FfiniteCofinite.mli;fp=src%2FfiniteCofinite.mli;h=cbe3c560d421b0306032e2fdde1b77d3331167bd;hb=4b52da1a20a4fe031930bb96d2ca46bec06dc529;hp=0000000000000000000000000000000000000000;hpb=a223af3254fb51c279cfbccdc18c59484fdca74e;p=SXSI%2Fxpathcomp.git diff --git a/src/finiteCofinite.mli b/src/finiteCofinite.mli new file mode 100644 index 0000000..cbe3c56 --- /dev/null +++ b/src/finiteCofinite.mli @@ -0,0 +1,44 @@ +exception InfiniteSet + +module type S = + sig + type elt + type t + type set + val empty : t + val any : t + val is_empty : t -> bool + val is_any : t -> bool + val is_finite : t -> bool + val kind : t -> [ `Cofinite | `Finite ] + val singleton : elt -> t + val mem : elt -> t -> bool + val add : elt -> t -> t + val remove : elt -> t -> t + val cup : t -> t -> t + val cap : t -> t -> t + val diff : t -> t -> t + val neg : t -> t + val compare : t -> t -> int + val subset : t -> t -> bool + val kind_split : t list -> t * t + val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a + val for_all : (elt -> bool) -> t -> bool + val exists : (elt -> bool) -> t -> bool + val filter : (elt -> bool) -> t -> t + val partition : (elt -> bool) -> t -> t * t + val cardinal : t -> int + val elements : t -> elt list + val from_list : elt list -> t + val choose : t -> elt + val hash : t -> int + val equal : t -> t -> bool + val uid : t -> Uid.t + val positive : t -> set + val negative : t -> set + val inj_positive : set -> t + val inj_negative : set -> t + end + +module Make : functor (E : Ptset.S) -> S with type elt = E.elt and type set = E.t +