Flatten the sources, only leave the XPath module packed.
[tatoo.git] / src / ata.mli
diff --git a/src/ata.mli b/src/ata.mli
new file mode 100644 (file)
index 0000000..bb94a7c
--- /dev/null
@@ -0,0 +1,93 @@
+(***********************************************************************)
+(*                                                                     *)
+(*                               TAToo                                 *)
+(*                                                                     *)
+(*                     Kim Nguyen, LRI UMR8623                         *)
+(*                   Université Paris-Sud & CNRS                       *)
+(*                                                                     *)
+(*  Copyright 2010-2013 Université Paris-Sud and Centre National de la *)
+(*  Recherche Scientifique. All rights reserved.  This file is         *)
+(*  distributed under the terms of the GNU Lesser General Public       *)
+(*  License, with the special exception on linking described in file   *)
+(*  ../LICENSE.                                                        *)
+(*                                                                     *)
+(***********************************************************************)
+
+(*
+  Time-stamp: <Last modified on 2013-04-04 18:42:38 CEST by Kim Nguyen>
+*)
+
+type predicate =
+    First_child
+  | Next_sibling
+  | Parent
+  | Previous_sibling
+  | Stay
+  | Is_first_child
+  | Is_next_sibling
+  | Is of Tree.NodeKind.t
+  | Has_first_child
+  | Has_next_sibling
+
+val is_move : predicate -> bool
+
+type atom = predicate * bool * State.t
+
+module Atom : Formula.ATOM with type data = atom
+
+module SFormula :
+  sig
+    include module type of Formula.Make(Atom)
+    val mk_atom : predicate -> bool -> State.t -> t
+    val mk_kind : Tree.NodeKind.t -> t
+    val has_first_child : t
+    val has_next_sibling : t
+    val is_first_child : t
+    val is_next_sibling : t
+    val is_attribute : t
+    val is_element : t
+    val is_processing_instruction : t
+    val is_comment : t
+    val first_child : State.t -> t
+    val next_sibling : State.t -> t
+    val parent : State.t -> t
+    val previous_sibling : State.t -> t
+    val stay : State.t -> t
+    val get_states : t -> StateSet.t
+  end
+
+
+module Transition : Hcons.S with
+            type data = State.t * QNameSet.t * SFormula.t
+
+module TransList : sig
+  include Hlist.S with type elt = Transition.t
+  val print : Format.formatter -> ?sep:string -> t -> unit
+end
+
+
+type t = private {
+  id : Uid.t;
+  mutable states : StateSet.t;
+  mutable selection_states: StateSet.t;
+  transitions: (State.t, (QNameSet.t*SFormula.t) list) Hashtbl.t;
+  mutable cache2 : TransList.t Cache.N2.t;
+  mutable cache6 : (TransList.t*StateSet.t) Cache.N6.t;
+}
+
+
+
+val create : StateSet.t -> StateSet.t -> t
+val reset : t -> unit
+val get_trans : t -> QNameSet.elt -> StateSet.t -> TransList.t
+
+val eval_trans : t -> TransList.t
+  -> StateSet.t -> StateSet.t -> StateSet.t -> StateSet.t
+  -> bool -> bool -> bool -> bool -> Tree.NodeKind.t
+  -> TransList.t*StateSet.t
+
+val add_trans : t -> State.t -> QNameSet.t -> SFormula.t -> unit
+val print : Format.formatter -> t -> unit
+val complete_transitions : t -> unit
+val cleanup_states : t -> unit
+val normalize_negations : t -> unit