X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Fata.mli;h=e1fdc4a2fd1a95e72e101e6bc17285e97ecb0ba6;hp=2aa27b3c7894fbd1422350457f3ce75203a4c4fe;hb=35abea737ead2d4fd121d0cb8bdbda38cfcaa8d3;hpb=78d247dc5e6d5e64a4ab848702c23ce81b6fc615 diff --git a/src/ata.mli b/src/ata.mli index 2aa27b3..e1fdc4a 100644 --- a/src/ata.mli +++ b/src/ata.mli @@ -39,19 +39,24 @@ module Move : (** Type of moves an automaton can perform *) type predicate = - Move of move * State.t (** In the [move] direction, the automaton must be in the given state *) - | Is_first_child (** True iff the node is the first child of its parent *) - | Is_next_sibling (** True iff the node is the next sibling of its parent *) + Move of move * State.t (** In the [move] direction, + the automaton must be in the given state *) + | Is_first_child (** True iff + the node is the first child of its parent *) + | Is_next_sibling (** True iff + the node is the next sibling of its parent *) | Is of Tree.NodeKind.t (** True iff the node is of the given kind *) | Has_first_child (** True iff the node has a first child *) | Has_next_sibling (** True iff the node has a next sibling *) -(** Type of the predicates that can occur in the Boolean formulae that are in the transitions of the automaton *) +(** Type of the predicates that can occur in the Boolean formulae that + are in the transitions of the automaton *) module Atom : sig include Hcons.S with type data = predicate include Common_sig.Printable with type t := t end -(** Module representing atoms of Boolean formulae, which are simply hashconsed [predicate]s *) +(** Module representing atoms of Boolean formulae, which are simply + hashconsed [predicate]s *) module Formula : sig @@ -61,25 +66,28 @@ module Formula : val parent : State.t -> t val previous_sibling : State.t -> t val stay : State.t -> t - (** [first_child], [next_sibling], [parent], [previous_sibling], [stay] create a formula which consists only - of the corresponding [move] atom. *) + (** [first_child], [next_sibling], [parent], [previous_sibling], + [stay] create a formula which consists only of the + corresponding [move] atom. *) val is_first_child : t val is_next_sibling : t val has_first_child : t val has_next_sibling : t - (** [is_first_child], [is_next_sibling], [has_first_child], [has_next_sibling] are constant formulae which consist - only of the corresponding atom - *) + (** [is_first_child], [is_next_sibling], [has_first_child], + [has_next_sibling] are constant formulae which consist only + of the corresponding atom *) val is : Tree.NodeKind.t -> t (** [is k] creates a formula that tests the kind of the current node *) val is_attribute : t val is_element : t val is_processing_instruction : t val is_comment : t - (** [is_attribute], [is_element], [is_processing_instruction], [is_comment] are constant formulae that tests a - particular kind *) + (** [is_attribute], [is_element], [is_processing_instruction], + [is_comment] are constant formulae that tests a particular + kind *) val get_states : t -> StateSet.t - (** [get_state f] retrieves all the states occuring in [move] predicates in [f] *) + (** [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 *) @@ -88,7 +96,8 @@ module Transition : sig include Hcons.S with type data = State.t * QNameSet.t * Formula.t val print : Format.formatter -> t -> unit end -(** A [Transition.t] is a hashconsed triple of the state, the set of labels and the formula *) +(** A [Transition.t] is a hashconsed triple of the state, the set of + labels and the formula *) module TransList : sig @@ -192,9 +201,9 @@ sig (** Add a transition to the automaton *) val finalize : t -> auto - (** Finalize the automaton and return it. Clean-up unused states (states that - do not occur in any transitions and remove instantes of negative [move] atoms - by creating fresh states that accept the complement of the negated state. - *) +(** Finalize the automaton and return it. Clean-up unused states + (states that do not occur in any transitions and remove + instantes of negative [move] atoms by creating fresh states + that accept the complement of the negated state. *) end (** Builder facility for the automaton *)