X-Git-Url: http://git.nguyen.vg/gitweb/?a=blobdiff_plain;f=src%2Fquery_tree.mli;h=6a8678fdf263e454611fbc53e8d16a782007753e;hb=c7229e6e3c000938a74abeb52749f62a65c3bbfd;hp=9afa1ad25179f79b934bef70888e85ef0d2cb6a5;hpb=f3a0235e4715d24d8e8b4053923d433e1d876851;p=tatoo.git diff --git a/src/query_tree.mli b/src/query_tree.mli index 9afa1ad..6a8678f 100644 --- a/src/query_tree.mli +++ b/src/query_tree.mli @@ -1,9 +1,12 @@ +val compteur : int ref +(**the counter of nodes*) + 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 element_by_tag : Naive_tree.t -> QNameSet.t -> Naive_tree.node list +val element_by_tag : Naive_tree.t -> QNameSet.t -> Tree.NodeKind.t -> Naive_tree.node list (** [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 +18,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 -> Naive_tree.node list ->Table.query_tree -> Naive_tree.node list +(** [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 *)