Refactor xpath parser and ast in a submodule.
[tatoo.git] / src / formula.mli
index 9b2659f..9a0b066 100644 (file)
 (*                                                                     *)
 (***********************************************************************)
 
+(*
+  Time-stamp: <Last modified on 2013-02-04 16:04:03 CET by Kim Nguyễn>
+*)
+
 (** Implementation of hashconsed Boolean formulae *)
 
-type move = [ `Left |`Right ]
+type move = [ `Left | `Right | `Epsilon | `Up1 | `Up2 ]
+
 (** Direction for automata predicates *)
 
 type 'formula expr =
@@ -23,8 +28,7 @@ type 'formula expr =
   | True
   | Or of 'formula * 'formula
   | And of 'formula * 'formula
-  | Move of (move * bool * State.t)
-  | Label of QNameSet.t
+  | Atom of move * bool * State.t
 
 (** View of the internal representation of a formula,
     used for pattern matching *)
@@ -52,9 +56,6 @@ val expr : t -> t expr
 val compare : t -> t -> int
 (** Comparison of formulae *)
 
-val size : t -> int
-(** Syntactic size of the formula *)
-
 val print : Format.formatter -> t -> unit
 (** Pretty printer *)
 
@@ -82,14 +83,3 @@ val and_ : t -> t -> t
 
 val of_bool : bool -> t
 (** Convert an ocaml Boolean value to a formula *)
-
-module Infix : sig
-  val ( +| ) : t -> t -> t
-  val ( *& ) : t -> t -> t
-  val ( *+ ) : move -> StateSet.elt -> t
-  val ( *- ) : move -> StateSet.elt -> t
-end
-(** Module to facilitate infix notations of formulae.
-    Just [open Formla.Infix] and write:
-    [let f = `Left *+ q1 +| `Right *+ q2 in ...]
-*)