let core_notation_script = "../../matita/core_notation.moo";;
-let get_from_user ~(dbd:Mysql.dbd) =
+let get_from_user ~(dbd:HMysql.dbd) =
let rec get () =
match read_line () with
| "" -> []
term, metasenv, ugraph
;;
+let full = ref false;;
+
let _ =
let module S = Saturation in
- let set_ratio v = S.weight_age_ratio := (v+1); S.weight_age_counter := (v+1)
+ let set_ratio v = S.weight_age_ratio := v; S.weight_age_counter := v
and set_sel v = S.symbols_ratio := v; S.symbols_counter := v;
and set_conf f = configuration_file := f
- and set_lpo () = Utils.compare_terms := Utils.lpo
- and set_kbo () = Utils.compare_terms := Utils.nonrec_kbo
+ and set_ordering o =
+ match o with
+ | "lpo" -> Utils.compare_terms := Utils.lpo
+ | "kbo" -> Utils.compare_terms := Utils.kbo
+ | "nr-kbo" -> Utils.compare_terms := Utils.nonrec_kbo
+ | o -> raise (Arg.Bad ("Unknown term ordering: " ^ o))
and set_fullred b = S.use_fullred := b
and set_time_limit v = S.time_limit := float_of_int v
+ and set_width w = S.maxwidth := w
+ and set_depth d = S.maxdepth := d
+ and set_full () = full := true
in
Arg.parse [
+ "-full", Arg.Unit set_full, "Enable full mode";
"-f", Arg.Bool set_fullred,
"Enable/disable full-reduction strategy (default: enabled)";
- "-r", Arg.Int set_ratio, "Weight-Age equality selection ratio (default: 3)";
+ "-r", Arg.Int set_ratio, "Weight-Age equality selection ratio (default: 4)";
"-s", Arg.Int set_sel,
- "symbols-based selection ratio (relative to the weight ratio, default: 2)";
+ "symbols-based selection ratio (relative to the weight ratio, default: 0)";
"-c", Arg.String set_conf, "Configuration file (for the db connection)";
- "-lpo", Arg.Unit set_lpo, "Use lpo term ordering";
-
- "-kbo", Arg.Unit set_kbo, "Use (non-recursive) kbo term ordering (default)";
+ "-o", Arg.String set_ordering,
+ "Term ordering. Possible values are:\n" ^
+ "\tkbo: Knuth-Bendix ordering\n" ^
+ "\tnr-kbo: Non-recursive variant of kbo (default)\n" ^
+ "\tlpo: Lexicographic path ordering";
- "-l", Arg.Int set_time_limit, "Time limit (in seconds)";
+ "-l", Arg.Int set_time_limit, "Time limit in seconds (default: no limit)";
+
+ "-w", Arg.Int set_width,
+ Printf.sprintf "Maximal width (default: %d)" !Saturation.maxwidth;
+
+ "-d", Arg.Int set_depth,
+ Printf.sprintf "Maximal depth (default: %d)" !Saturation.maxdepth;
] (fun a -> ()) "Usage:"
in
Helm_registry.load_from !configuration_file;
CicNotation.load_notation core_notation_script;
-CicNotation.load_notation "../../matita/coq.moo";
-let dbd = Mysql.quick_connect
+CicNotation.load_notation "../../matita/coq.ma";
+let dbd = HMysql.quick_connect
~host:(Helm_registry.get "db.host")
~user:(Helm_registry.get "db.user")
~database:(Helm_registry.get "db.database")
()
in
let term, metasenv, ugraph = get_from_user ~dbd in
-Saturation.main dbd term metasenv ugraph;;
+Saturation.main dbd !full term metasenv ugraph;;