]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/paramodulation/saturate_main.ml
ocaml 3.09 transition
[helm.git] / helm / ocaml / paramodulation / saturate_main.ml
index efcc3a2d8e6e41f775b439792ea4cfbcb5bf596e..ce4182e1ac6ac8620ef002181ef16e0097fe06df 100644 (file)
@@ -42,6 +42,8 @@ let get_from_user ~(dbd:HMysql.dbd) =
 
 let full = ref false;;
 
+let retrieve_only = ref false;;
+
 let _ =
   let module S = Saturation in
   let set_ratio v = S.weight_age_ratio := v; S.weight_age_counter := v
@@ -58,6 +60,7 @@ let _ =
   and set_width w = S.maxwidth := w
   and set_depth d = S.maxdepth := d
   and set_full () = full := true
+  and set_retrieve () = retrieve_only := true
   in
   Arg.parse [
     "-full", Arg.Unit set_full, "Enable full mode";
@@ -84,6 +87,8 @@ let _ =
     
     "-d", Arg.Int set_depth,
     Printf.sprintf "Maximal depth (default: %d)" !Saturation.maxdepth;
+
+    "-retrieve", Arg.Unit set_retrieve, "retrieve only";
   ] (fun a -> ()) "Usage:"
 in
 Helm_registry.load_from !configuration_file;
@@ -96,4 +101,8 @@ let dbd = HMysql.quick_connect
   ()
 in
 let term, metasenv, ugraph = get_from_user ~dbd in
-Saturation.main dbd !full term metasenv ugraph;;
+if !retrieve_only then
+  Saturation.retrieve_and_print dbd term metasenv ugraph
+else
+  Saturation.main dbd !full term metasenv ugraph
+;;