X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fasta.mli;h=3fd98866fda59723cae6cda15afa203933eded4e;hb=07a2770a48f51b2e09b3be2d1608516b2377618e;hp=0dd1994a83457376527d7e96654f03ce207d51f4;hpb=8beacdfe24b6e93a7c1a4faee4c5587104f5c1ad;p=tatoo.git diff --git a/src/asta.mli b/src/asta.mli index 0dd1994..3fd9886 100644 --- a/src/asta.mli +++ b/src/asta.mli @@ -2,8 +2,8 @@ (* *) (* TAToo *) (* *) -(* ? *) -(* ? *) +(* Lucca Hirschi, LRI UMR8623 *) +(* Université Paris-Sud & CNRS *) (* *) (* Copyright 2010-2012 Université Paris-Sud and Centre National de la *) (* Recherche Scientifique. All rights reserved. This file is *) @@ -16,26 +16,80 @@ (** Implementation of alternating selecting tree automata (ASTA) *) -type state +type state = State.t (** The type of states *) -type label +type label = QNameSet.t (** The type of labels of the transitions *) -type formula +type formula = Formula.t (** The type of transition formulae *) +type transition = (state*label*formula) +(** The type of transitions *) + type t (** The type of ASTAs *) val transition : t -> state -> label -> formula (** Give the formula which must hold for a current state and label *) -val transitions : t -> state -> (label*formula) list -(** Give the list of labels and formulae from transitions for a given state *) +val transitions : t -> state -> (label*formula) list * (label*formula) list +(** Give the list of labels and formulae from queries and recognizing + transitions for a given state *) + +val transitions_lab : t -> QName.t -> (state*formula) list *(state*formula) list +(** Give the list of states and formulae from queries and recognizing + transitions for a given tag *) + +val transitions_st_lab : t -> state -> QName.t -> formula list * formula list +(** Give the list of formulae from queries and recognizing transitions for a + given state and tag *) + +val empty : t +(** The empty automaton *) + +val any_label : label +(** Set of all labels which can occur in a tree *) + +val new_state : unit -> state +(** Give a new state (different from all others states) *) + +val add_tr : t -> transition -> bool -> unit +(** Add a query transition (recognizing transition if flag=false) to an asta *) + +val add_reco : t -> state -> unit +(** Add a state to the recognizing states of an asta *) + +val add_quer : t -> state -> unit +(** Add a state to the query states of an asta *) + +val add_selec : t -> state -> unit +(** Add a state to the selecting states of an asta *) + +val add_bot : t -> state -> unit +(** Add a state to the bottom states of an asta *) + +val add_top : t -> state -> unit +(** Add a state to the top states of an asta *) + +val init_top : t -> unit +(** Remove all top states *) + +val top_states : t -> state list +(** Give the list of top states of an ASTA *) + +val top_states_s : t -> StateSet.t +(** Give the set of top states of an ASTA *) + +val bot_states_s : t -> StateSet.t +(** Give the set of bottom states of an ASTA *) + +val selec_states : t -> StateSet.t +(** Give the list of selecting states of an ASTA *) val print : Format.formatter -> t -> unit -(** Describe the automaton as text *) +(** Pretty printer *) val to_file : out_channel -> t -> unit (** Outputs the description of the automaton on the given out_channel *)