Implement the ranked automata evaluation to guarantee a O(|D|x|Q|)
[tatoo.git] / src / ata.mli
index 650673e..2aa27b3 100644 (file)
@@ -32,6 +32,7 @@ module Move :
     val iter : (t -> 'a -> unit) -> 'a table -> unit
     val fold : (t -> 'a -> 'b -> 'b) -> 'a table -> 'b -> 'b
     val for_all : (t -> 'a -> bool) -> 'a table -> bool
+    val for_all2 : (t -> 'a -> 'b -> bool) -> 'a table -> 'b table -> bool
     val exists : (t -> 'a -> bool) -> 'a table -> bool
   end
 
@@ -48,7 +49,7 @@ type predicate =
 
 module Atom : sig
   include Hcons.S with type data = predicate
-  include Common_sig.Printable with type t:= t
+  include Common_sig.Printable with type t := t
 end
 (** Module representing atoms of Boolean formulae, which are simply hashconsed [predicate]s *)
 
@@ -112,6 +113,15 @@ val get_starting_states : t -> StateSet.t
 val get_selecting_states : t -> StateSet.t
 (** return the set of selecting states of the automaton *)
 
+val get_states_by_rank : t -> StateSet.t array
+(** return an array of states ordered by ranks.
+*)
+
+val get_max_rank : t -> int
+(** return the maximal rank of a state in the automaton, that is the
+    maximum number of runs needed to fuly evaluate the automaton.
+*)
+
 val get_trans : t -> QNameSet.elt -> StateSet.t -> TransList.t
 (** [get_trans auto l q] returns the list of transitions taken by [auto]
     for label [l] in state [q]. Takes time proportional to the number of