Print labels (=QName -> qname.ml? )
[tatoo.git] / src / asta.mli
1 (***********************************************************************)
2 (*                                                                     *)
3 (*                               TAToo                                 *)
4 (*                                                                     *)
5 (*                  Lucca Hirschi, ?                                   *)
6 (*                  ?                                                  *)
7 (*                                                                     *)
8 (*  Copyright 2010-2012 Université Paris-Sud and Centre National de la *)
9 (*  Recherche Scientifique. All rights reserved.  This file is         *)
10 (*  distributed under the terms of the GNU Lesser General Public       *)
11 (*  License, with the special exception on linking described in file   *)
12 (*  ../LICENSE.                                                        *)
13 (*                                                                     *)
14 (***********************************************************************)
15
16 (** Implementation of alternating selecting tree automata (ASTA) *)
17
18
19 type state = State.t
20 (** The type of states *)
21
22 type label = QNameSet.t
23 (** The type of labels of the transitions *)
24
25 type formula = Formula.t
26 (** The type of transition formulae *)
27
28 type transition = (state*label*formula)
29 (** The type of transitions *)
30
31 type t
32 (** The type of ASTAs *)
33
34 val transition : t -> state -> label -> formula
35 (** Give the formula which must hold for a current state and label *)
36
37 val transitions : t -> state -> (label*formula) list
38 (** Give the list of labels and formulae from transitions for a given state *)
39
40 val empty : t
41 (** The empty automaton *)
42
43 val any_label : label
44 (** Set of all labels which can occur in a tree *)
45
46 val new_state : unit -> state
47 (** Give a new state (different from all others states) *)
48
49 val add_tr : t -> transition -> unit
50 (** Add a transition to an asta *) 
51
52 val add_reco : t -> state -> unit
53 (** Add a state to the recognizing states of an asta *)
54
55 val add_selec : t -> state -> unit
56 (** Add a state to the recognizing states of an asta *)
57
58 val add_bot : t -> state -> unit
59 (** Add a state to the bottom states of an asta *)
60
61 val add_top : t -> state -> unit
62 (** Add a state to the top states of an asta *)
63
64 val top_states : t -> state list
65 (** Give the list of top states of an ASTA *)
66
67 val print : Format.formatter -> t -> unit
68 (** Describe the automaton as text *)
69
70 val to_file : out_channel -> t -> unit
71 (** Outputs the description of the automaton on the given out_channel *)