Merge branch 'local-ocamlbuild' into local-trunk
[SXSI/xpathcomp.git] / src / formula.mli
diff --git a/src/formula.mli b/src/formula.mli
new file mode 100644 (file)
index 0000000..88763ee
--- /dev/null
@@ -0,0 +1,43 @@
+type 'a expr =
+    False
+    | True
+    | Or of 'a * 'a
+    | And of 'a * 'a
+    | Atom of ([ `Left |`Right ] * bool * State.t)
+    | Pred of Tree.Predicate.t
+
+type t
+val hash : t -> int
+val uid : t -> Uid.t
+val equal : t -> t -> bool
+val expr : t -> t expr
+val st :
+  t ->
+  (StateSet.t * StateSet.t * StateSet.t) *
+    (StateSet.t * StateSet.t * StateSet.t)
+val compare : t -> t -> int
+val size : t -> int
+val print : Format.formatter -> t -> unit
+val is_true : t -> bool
+val is_false : t -> bool
+val true_ : t
+val false_ : t
+val atom_ :
+  [ `Left | `Right ] -> bool -> StateSet.elt -> t
+val pred_ : Tree.Predicate.t -> t
+val not_ : t -> t
+val or_ : t -> t -> t
+val and_ : t -> t -> t
+val of_bool : bool -> t
+val or_pred : t -> t -> t
+val and_pred : t -> t -> t
+
+
+module Infix : sig
+  val ( +| ) : t -> t -> t
+  val ( *& ) : t -> t -> t
+  val ( *+ ) :
+    [ `Left | `Right ] -> StateSet.elt -> t
+  val ( *- ) :
+    [ `Left | `Right ] -> StateSet.elt -> t
+end