X-Git-Url: http://git.nguyen.vg/gitweb/?p=tatoo.git;a=blobdiff_plain;f=src%2Ftatoo.ml;h=24e212f6ba340e7f954112427758b62039ec240a;hp=57d5f1a5161b20616859dcf03f6950c3690dfe9a;hb=3406b26f1ea26a997d7f194c547439891c108ce6;hpb=129708eaa5983b9463f96b714c00468602339b0a diff --git a/src/tatoo.ml b/src/tatoo.ml index 57d5f1a..24e212f 100644 --- a/src/tatoo.ml +++ b/src/tatoo.ml @@ -53,7 +53,6 @@ let main () = let d = time Naive_tree.load_xml_file fd "parsing xml document" in close_fd (); d in - let () = Gc.compact () in let queries = time (fun l -> @@ -105,9 +104,10 @@ let main () = Logger.msg `STATS "@[Automaton: @\n%a@]" Ata.print auto) auto_list; end; - let module Naive = Run.Make(Naive_tree) in + let module Naive = Run.Make(Naive_tree)(Naive_node_list) in let result_list = - let root = [ Naive_tree.root doc] in + + let root = Naive_node_list.(add (Naive_tree.root doc) (create())) in let f, msg = match !Options.parallel, !Options.compose with true, true -> @@ -135,10 +135,10 @@ let main () = output_string output (string_of_int !count); output_string output "\" >\n"; if !Options.count then begin - output_string output (string_of_int (List.length results)); + output_string output (string_of_int (Naive_node_list.length results)); output_char output '\n'; end else - List.iter (fun n -> + Naive_node_list.iter (fun n -> Naive_tree.print_xml output doc n; output_char output '\n' ) results;