2 val mk_state : unit -> state
7 | Or of formula * formula
8 | And of formula * formula
9 | Atom of ([ `Left | `Right | `LLeft | `RRight ] * bool * state)
10 and formula = { fid : int; fkey : int; pos : formula_expr; neg : formula; st : (Ptset.t*Ptset.t*Ptset.t)*(Ptset.t*Ptset.t*Ptset.t); size: int;}
13 val atom_ : [`Left | `Right | `LLeft | `RRight ] -> bool -> state -> formula
14 val and_ : formula -> formula -> formula
15 val or_ : formula -> formula -> formula
16 val not_ : formula -> formula
17 (*val equal_form : formula -> formula -> bool *)
18 val pr_frm : Format.formatter -> formula -> unit
21 module HTagSet : Hashtbl.S with type key = Ptset.t*Tag.t
26 mutable states : Ptset.t;
28 mutable final : Ptset.t;
30 starstate : Ptset.t option;
31 (* Transitions of the Alternating automaton *)
32 phi : (state,(TagSet.t*(bool*formula*bool)) list) Hashtbl.t;
33 sigma : (int,('a t -> Tree.t -> Tree.t -> Ptset.t*'a)) Hashtbl.t;
36 val dump : Format.formatter -> 'a t -> unit
38 module Transitions : sig
39 type t = state*TagSet.t*bool*formula*bool
40 (* Doing this avoid the parenthesis *)
41 val ( ?< ) : state -> state
42 val ( >< ) : state -> TagSet.t*bool -> state*(TagSet.t*bool*bool)
43 val ( ><@ ) : state -> TagSet.t*bool -> state*(TagSet.t*bool*bool)
44 val ( >=> ) : state*(TagSet.t*bool*bool) -> formula -> t
45 val ( +| ) : formula -> formula -> formula
46 val ( *& ) : formula -> formula -> formula
47 val ( ** ) : [`Left | `Right | `LLeft | `RRight ] -> state -> formula
50 type transition = Transitions.t
51 val equal_trans : transition -> transition -> bool
54 module type ResultSet =
58 val cons : Tree.t -> t -> t
59 val concat : t -> t -> t
60 val iter : (Tree.t -> unit) -> t -> unit
61 val fold : (Tree.t -> 'a -> 'a) -> t -> 'a -> 'a
62 val map : (Tree.t -> Tree.t) -> t -> t
66 module IdSet : ResultSet
68 val top_down_count : 'a t -> Tree.t -> int
69 val top_down : 'a t -> Tree.t -> IdSet.t
70 val bottom_up_count_contains : 'a t -> Tree.t -> int
71 val bottom_up_count : 'a t -> Tree.t -> Tag.t -> int