# Contents of /types/boolean.mli

Revision 281 - (show annotations)
Tue Jul 10 17:22:16 2007 UTC (5 years, 10 months ago) by abate
File size: 1498 byte(s)
[r2003-04-02 12:34:22 by cvscast] Empty log message

Original author: cvscast
Date: 2003-04-02 12:34:22+00:00
 1 (* Implementation of boolean combination in disjunctive normal form (dnf). 2 A dnf is a disjunction of lines, each line consisting of a 3 conjunction of atoms and negations of atoms. 4 5 A line is coded as a pair (p,n) where p collects atoms and n 6 the negated atoms. p and n are disjoint and sorted lists without duplicates 7 (w.r.t Pervasives.compare). 8 9 A dnf is coded as a sorted list of lines without duplicated 10 (w.r.t Pervasives.compare). 11 *) 12 13 module type S = 14 sig 15 type 'a elem 16 type 'a t 17 18 val equal : 'a t -> 'a t -> bool 19 val compare: 'a t -> 'a t -> int 20 val hash: 'a t -> int 21 22 external get: 'a t -> ('a elem list * 'a elem list) list = "%identity" 23 24 val empty : 'a t 25 val full : 'a t 26 val cup : 'a t -> 'a t -> 'a t 27 val cap : 'a t -> 'a t -> 'a t 28 val diff : 'a t -> 'a t -> 'a t 29 val atom : 'a elem -> 'a t 30 31 val map : ('a elem-> 'b elem) -> 'a t -> 'b t 32 val iter: ('a elem-> unit) -> 'a t -> unit 33 val compute: empty:'d -> full:'c -> cup:('d -> 'c -> 'd) 34 -> cap:('c -> 'b -> 'c) -> diff:('c -> 'b -> 'c) -> 35 atom:('a elem -> 'b) -> 'a t -> 'd 36 val compute_bool: ('a elem -> 'b t) -> 'a t -> 'b t 37 38 val print: string -> (Format.formatter -> 'a elem -> unit) -> 'a t -> 39 (Format.formatter -> unit) list 40 41 42 val trivially_disjoint : 'a t -> 'a t -> bool 43 val check: 'a t -> unit 44 end 45 46 module Make(X : SortedList.ARG) : S with type 'a elem = 'a X.t 47 48 include S with type 'a elem = 'a and type 'a t = ('a list * 'a list) list