1 (***********************************************************************)
4 (* Nicolas Pouillard, Berke Durak, projet Gallium, INRIA Rocquencourt *)
6 (* Copyright 2007 Institut National de Recherche en Informatique et *)
7 (* en Automatique. All rights reserved. This file is distributed *)
8 (* under the terms of the Q Public License version 1.0. *)
10 (***********************************************************************)
13 (* Original author: Berke Durak *)
16 (** Provides a datatype for representing boolean formulas and evaluation,
17 iteration and map functions. *)
19 (** Public type for generic boolean formulas. An empty conjunction [And[]] is true and
20 an empty disjunction [Or[]] is false. *)
22 And
of 'a boolean list
23 | Or
of 'a boolean list
29 val eval
: ('a
-> bool) -> 'a boolean
-> bool
30 (** [eval g f] evaluates the boolean formula [f] using the values returned by [g] for the atoms. *)
31 val iter
: ('a
-> unit) -> 'a boolean
-> unit
32 (** [iter g f] calls [g] over every atom of [f]. *)
33 val map
: ('a
-> 'b
) -> 'a boolean
-> 'b boolean
34 (** [map g f] replaces every atom of [f] by its image by [g]. *)