X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_interpreter%2Fintersect.ml;h=e346101cf9152a19599ba0241b853801ebf67d8b;hb=2ef44e8d1a908a08d31e6114c15898ae7dc8109e;hp=f869838f3fba9facb00ac2d3ba21d151d1c2db5c;hpb=3b401fbefb3830d4f3cdce189ac31559c0219a0d;p=helm.git diff --git a/helm/ocaml/mathql_interpreter/intersect.ml b/helm/ocaml/mathql_interpreter/intersect.ml index f869838f3..e346101cf 100644 --- a/helm/ocaml/mathql_interpreter/intersect.ml +++ b/helm/ocaml/mathql_interpreter/intersect.ml @@ -68,7 +68,8 @@ let intersect_tails h1 t1 h2 t2 = try (*match xres_join_context h1 tl1 h2 tl2 with [] -> aux tll1 tll2 - | t ->*) (l1::(xres_join_context h1 tl1 h2 tl2))::(aux tll1 tll2) + | t -> (l1::(xres_join_context h1 tl1 h2 tl2))::(aux tll1 tll2)*) + (l1::(tl1 @ tl2))::(aux tll1 tll2) with Join_must_be_empty -> aux tll1 tll2 else @@ -85,6 +86,9 @@ let intersect_tails h1 t1 h2 t2 = * implementazione del comando INTERSECT *) let intersect_ex l1 l2 = + let _ = print_string ("INTERSECT ") + and t = Unix.time () in + let result = match (l1, l2) with ((head1::tail1), (head2::tail2)) -> (match (head1, head2) with @@ -129,5 +133,8 @@ let intersect_ex l1 l2 = ) (* match *) ) | _ -> [] + in + let _ = print_endline (string_of_float (Unix.time () -. t)); flush stdout in + result ;;