X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fata.mli;h=2aa27b3c7894fbd1422350457f3ce75203a4c4fe;hp=00070d4c3d287cc5b3b07d0929fa36a307fa836c;hb=78d247dc5e6d5e64a4ab848702c23ce81b6fc615;hpb=aade6d9ba2e2b65e021de8a1c3a2d3874aa5742e diff --git a/src/ata.mli b/src/ata.mli index 00070d4..2aa27b3 100644 --- a/src/ata.mli +++ b/src/ata.mli @@ -21,6 +21,21 @@ type move = [ `First_child | `Parent | `Previous_sibling | `Stay ] + +module Move : + sig + type t = move + type 'a table + val create_table : 'a -> 'a table + val get : 'a table -> t -> 'a + val set : 'a table -> t -> 'a -> unit + 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 + (** Type of moves an automaton can perform *) type predicate = @@ -34,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 *) @@ -65,6 +80,7 @@ module Formula : particular kind *) val get_states : t -> StateSet.t (** [get_state f] retrieves all the states occuring in [move] predicates in [f] *) + val get_states_by_move : t -> StateSet.t Move.table end (** Modules representing the Boolean formulae used in transitions *) @@ -97,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