1 (***********************************************************************)
5 (* Kim Nguyen, LRI UMR8623 *)
6 (* Université Paris-Sud & CNRS *)
8 (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (* Recherche Scientifique. All rights reserved. This file is *)
10 (* distributed under the terms of the GNU Lesser General Public *)
11 (* License, with the special exception on linking described in file *)
14 (***********************************************************************)
17 Time-stamp: <Last modified on 2013-01-30 19:08:52 CET by Kim Nguyen>
20 (** Implementation of hashconsed Boolean formulae *)
22 type move = [ `Left | `Right | `Epsilon | `Up1 | `Up2 ]
24 (** Direction for automata predicates *)
29 | Or of 'formula * 'formula
30 | And of 'formula * 'formula
31 | Move of move * bool * State.t
33 (** View of the internal representation of a formula,
34 used for pattern matching *)
38 (** Abstract type representing hashconsed formulae *)
41 (** Hash function for formulae *)
44 (** Returns a unique ID for formulae *)
46 val equal : t -> t -> bool
47 (** Equality over formulae *)
49 val expr : t -> t expr
50 (** Equality over formulae *)
52 (*val st : t -> StateSet.t * StateSet.t
53 (** states occuring left and right, positively or negatively *)
56 val compare : t -> t -> int
57 (** Comparison of formulae *)
59 val print : Format.formatter -> t -> unit
62 val is_true : t -> bool
63 (** [is_true f] tests whether the formula is the atom True *)
65 val is_false : t -> bool
66 (** [is_false f] tests whether the formula is the atom False *)
74 val atom_ : move -> bool -> StateSet.elt -> t
75 (** [atom_ dir b q] creates a down_left or down_right atom for state
76 [q]. The atom is positive if [b == true].
81 val and_ : t -> t -> t
82 (** Boolean connective *)
84 val of_bool : bool -> t
85 (** Convert an ocaml Boolean value to a formula *)