f34cc3b1520f344e38a6723b57981043860e43b5
[tatoo.git] / src / query_tree.mli
1 val compteur : int ref
2
3 val all_nodes : Naive_tree.t -> Naive_tree.node list
4 (** [all_nodes t] returns all the nodes in the tree [t].
5     Returns an empty list if there are no nodes in the tree.
6  *)
7
8 val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Naive_tree.node list
9 (** [element_by_tag t tag] returns all the nodes whose tag equal to [tag] in the tree [t]. *)
10
11 val compile_single_path : Xpath.Ast.single_path -> Table.query_tree 
12 (** il y a un cycle si on met la definition de query_tree dans le fichier [Query_tree.ml]
13     [compile_single_path spath] returns un query_tree built with [spath]
14 *)
15
16 val compile_xpath : Xpath.Ast.path -> Table.query_tree 
17 (** [compile_xpath path] returns un query_tree built with [xpath]
18 *)
19
20 val union_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
21 (** union two lists without duplicating
22 *)
23
24 val inter_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
25 (** make a list without duplicating by using the intersection of two lists 
26 *)
27
28 val diff_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list 
29 (** difference two lists without duplicating
30 *)
31
32 val eval_query_tree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list
33 (** [eval_query_tree tree start q] returns the set of nodes that evaluate by the query_tree [q].
34     [start] the set of nodes departing.
35     [q] query_tree
36 *)
37
38 val minimize_qtree : Table.query_tree -> Table.query_tree
39
40 val eval_qtree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list