1) Utiliser bitvector pour preserver l'ordre pendant l'evaluation
[tatoo.git] / src / query_tree.mli
index 9afa1ad..7335e52 100644 (file)
@@ -1,9 +1,7 @@
-val all_nodes : Naive_tree.t -> Naive_tree.node list
-(** [all_nodes t] returns all the nodes in the tree [t].
-    Returns an empty list if there are no nodes in the tree.
- *)
+val compteur : int ref
+(**the counter of nodes*)
 
-val element_by_tag : Naive_tree.t -> QNameSet.t -> Naive_tree.node list
+val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Bitvector.t
 (** [element_by_tag t tag] returns all the nodes whose tag equal to [tag] in the tree [t]. *)
 
 val compile_single_path : Xpath.Ast.single_path -> Table.query_tree 
@@ -15,20 +13,13 @@ val compile_xpath : Xpath.Ast.path -> Table.query_tree
 (** [compile_xpath path] returns un query_tree built with [xpath]
 *)
 
-val union_list : Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
-(** union two lists without duplicating
-*)
-
-val inter_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list
-(** make a list without duplicating by using the intersection of two lists 
-*)
-
-val diff_list :  Naive_tree.t ->Naive_tree.node list -> Naive_tree.node list -> Naive_tree.node list 
-(** difference two lists without duplicating
+val minimize_qtree : Table.query_tree -> Table.query_tree
+(** [minimize_qtree q] returns the minimum query_tree of [q]
+    [q] query_tree
 *)
 
-val eval_query_tree : Naive_tree.t -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list
-(** [eval_query_tree tree start q] returns the set of nodes that evaluate by the query_tree [q].
+val eval_qtree : Naive_tree.t -> Bitvector.t ->Table.query_tree -> Bitvector.t
+(** [eval_qtree tree start q] returns the set of nodes that evaluate by the query_tree [q].
     [start] the set of nodes departing.
     [q] query_tree
 *)