+ module type ResultSet =
+ sig
+ type t
+ val empty : t
+ val cons : Tree.t -> t -> t
+ val concat : t -> t -> t
+ val iter : (Tree.t -> unit) -> t -> unit
+ val fold : (Tree.t -> 'a -> 'a) -> t -> 'a -> 'a
+ val map : (Tree.t -> Tree.t) -> t -> t
+ val length : t -> int
+ end
+
+ module IdSet : ResultSet
+
+ val top_down_count : 'a t -> Tree.t -> int
+ val top_down : 'a t -> Tree.t -> IdSet.t
+
+ type jump_kind = [ `TAG of Tag.t | `CONTAINS of string | `NOTHING ]
+ val bottom_up_count : 'a t -> Tree.t -> jump_kind -> int