]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/paramodulation/saturate_main.ml
bugfixes:
[helm.git] / helm / ocaml / paramodulation / saturate_main.ml
index 69d50e3a0cd7264ea84685d06417f9792bea4fb8..14d81569aab72dd96fe2f512cb9aa82c737a553c 100644 (file)
@@ -47,9 +47,10 @@ struct
   exception Exit
   module Callbacks =
   struct
+    let non p x = not (p x)
     let interactive_user_uri_choice ~selection_mode ?ok
           ?(enable_button_for_non_vars = true) ~title ~msg ~id uris =
-              raise Exit
+            List.filter (non UriManager.uri_is_var) uris
     let interactive_interpretation_choice interp = raise Exit
     let input_or_locate_uri ~(title:string) ?id = raise Exit
   end
@@ -87,6 +88,8 @@ let full = ref false;;
 
 let retrieve_only = ref false;;
 
+let demod_equalities = ref false;;
+
 let _ =
   let module S = Saturation in
   let set_ratio v = S.weight_age_ratio := v; S.weight_age_counter := v
@@ -104,6 +107,7 @@ let _ =
   and set_depth d = S.maxdepth := d
   and set_full () = full := true
   and set_retrieve () = retrieve_only := true
+  and set_demod_equalities () = demod_equalities := true
   in
   Arg.parse [
     "-full", Arg.Unit set_full, "Enable full mode";
@@ -132,11 +136,12 @@ let _ =
     Printf.sprintf "Maximal depth (default: %d)" !Saturation.maxdepth;
 
     "-retrieve", Arg.Unit set_retrieve, "retrieve only";
+    "-demod-equalities", Arg.Unit set_demod_equalities, "demod equalities";
   ] (fun a -> ()) "Usage:"
 in
 Helm_registry.load_from !configuration_file;
-CicNotation.load_notation core_notation_script;
-CicNotation.load_notation "../../matita/coq.ma";
+CicNotation2.load_notation core_notation_script;
+CicNotation2.load_notation "../../matita/coq.ma";
 let dbd = HMysql.quick_connect
   ~host:(Helm_registry.get "db.host")
   ~user:(Helm_registry.get "db.user")
@@ -146,6 +151,8 @@ in
 let term, metasenv, ugraph = get_from_user ~dbd in
 if !retrieve_only then
   Saturation.retrieve_and_print dbd term metasenv ugraph
+else if !demod_equalities then
+  Saturation.main_demod_equalities dbd term metasenv ugraph
 else
   Saturation.main dbd !full term metasenv ugraph
 ;;