]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/test.ml
Fixed "$" in parser
[fireball-separation.git] / ocaml / test.ml
index 2f6017a58660319ac75e6a668c1a10ae9b939af4..f5bf55a50280c7ac20c3048761d8f0e9bc984065 100644 (file)
@@ -1,12 +1,4 @@
-let three = Array.length Sys.argv = 1;;
-
-let discriminator =
- if three
- then (module Lambda3 : Discriminator.Discriminator)
- else (module Lambda4);;
-
-module Pippo = (val discriminator);;
-open Pippo;;
+open Lambda4;;
 
 let acaso l =
     let n = Random.int (List.length l) in
@@ -59,18 +51,18 @@ let rec repeat f n =
   if n > 0 then repeat f (n-1)
 ;;
 
-let call_main3 tms =
+(* let call_main3 tms =
   let _ = (
   List.iter prerr_endline tms; prerr_newline ();
   ) in Lambda3.main [Lambda3.magic tms ["*"]]
-;;
+;; *)
 let call_main4 div convs nums =
   let _ = (
   (match div with Some div -> prerr_endline ("DIV: " ^ div) | None -> ());
   print_endline "CONV:"; List.iter prerr_endline convs;
   print_endline "NUMS:"; List.iter prerr_endline nums;
   prerr_newline ();
-  ) in Lambda4.main [Lambda4.magic_conv div convs nums ["*"]]
+  ) in Lambda4.solve (Lambda4.problem_of div convs nums)
 ;;
 
 let main =
@@ -81,11 +73,12 @@ let main =
 
   (* let open Parser in *)
 
-  if three then repeat (fun _ ->
+  (* if three then repeat (fun _ ->
     let tms = test3 complex vars in
     call_main3 tms
   ) num
-  else repeat (fun _ ->
+  else *)
+  repeat (fun _ ->
     let div, (conv, nums) = test4 complex vars in
     call_main4 (Some div) conv nums
   ) num