Module Path_glob.Formula

type 'a t =
| And of 'a t list
| Or of 'a t list
| Not of 'a t
| Atom of 'a
| True
| False

Public type for generic propositional formulas. An empty conjunction And[] is true and an empty disjunction Or[] is false.

val eval : ('a -> bool) -> 'a t -> bool

eval g f evaluates the formula f using the values returned by g for the atoms.

val iter : ('a -> unit) -> 'a t -> unit

iter g f calls g over every atom of f.

val map : ('a -> 'b) -> 'a t -> 'b t

map g f replaces every atom of f by its image by g.