53 type prover = params -> minimize_command -> prover_problem -> prover_result |
53 type prover = params -> minimize_command -> prover_problem -> prover_result |
54 |
54 |
55 (* for experimentation purposes -- do not use in production code *) |
55 (* for experimentation purposes -- do not use in production code *) |
56 val atp_run_twice_threshold : int Unsynchronized.ref |
56 val atp_run_twice_threshold : int Unsynchronized.ref |
57 val atp_first_iter_time_frac : real Unsynchronized.ref |
57 val atp_first_iter_time_frac : real Unsynchronized.ref |
|
58 val smt_triggers : bool Unsynchronized.ref |
58 val smt_weights : bool Unsynchronized.ref |
59 val smt_weights : bool Unsynchronized.ref |
59 val smt_weight_min_facts : int Unsynchronized.ref |
60 val smt_weight_min_facts : int Unsynchronized.ref |
60 val smt_min_weight : int Unsynchronized.ref |
61 val smt_min_weight : int Unsynchronized.ref |
61 val smt_max_weight : int Unsynchronized.ref |
62 val smt_max_weight : int Unsynchronized.ref |
62 val smt_max_weight_index : int Unsynchronized.ref |
63 val smt_max_weight_index : int Unsynchronized.ref |
63 val smt_weight_curve : (int -> int) Unsynchronized.ref |
64 val smt_weight_curve : (int -> int) Unsynchronized.ref |
64 val smt_max_iters : int Unsynchronized.ref |
65 val smt_max_iters : int Unsynchronized.ref |
65 val smt_iter_fact_frac : real Unsynchronized.ref |
66 val smt_iter_fact_frac : real Unsynchronized.ref |
66 val smt_iter_time_frac : real Unsynchronized.ref |
67 val smt_iter_time_frac : real Unsynchronized.ref |
67 val smt_iter_min_msecs : int Unsynchronized.ref |
68 val smt_iter_min_msecs : int Unsynchronized.ref |
68 val smt_monomorph_limit : int Unsynchronized.ref |
69 val smt_monomorphize_limit : int Unsynchronized.ref |
69 |
70 |
70 val das_Tool : string |
71 val das_Tool : string |
71 val select_smt_solver : string -> Proof.context -> Proof.context |
72 val select_smt_solver : string -> Proof.context -> Proof.context |
72 val is_smt_prover : Proof.context -> string -> bool |
73 val is_smt_prover : Proof.context -> string -> bool |
73 val is_prover_available : Proof.context -> string -> bool |
74 val is_prover_available : Proof.context -> string -> bool |
287 |> tap (after path) |
288 |> tap (after path) |
288 |
289 |
289 fun proof_banner auto = |
290 fun proof_banner auto = |
290 if auto then "Auto Sledgehammer found a proof" else "Try this command" |
291 if auto then "Auto Sledgehammer found a proof" else "Try this command" |
291 |
292 |
292 val smt_weights = Unsynchronized.ref true |
293 val smt_triggers = Unsynchronized.ref false |
|
294 val smt_weights = Unsynchronized.ref false |
293 val smt_weight_min_facts = Unsynchronized.ref 20 |
295 val smt_weight_min_facts = Unsynchronized.ref 20 |
294 |
296 |
295 (* FUDGE *) |
297 (* FUDGE *) |
296 val smt_min_weight = Unsynchronized.ref 0 |
298 val smt_min_weight = Unsynchronized.ref 0 |
297 val smt_max_weight = Unsynchronized.ref 10 |
299 val smt_max_weight = Unsynchronized.ref 10 |
519 (* FUDGE *) |
521 (* FUDGE *) |
520 val smt_max_iters = Unsynchronized.ref 8 |
522 val smt_max_iters = Unsynchronized.ref 8 |
521 val smt_iter_fact_frac = Unsynchronized.ref 0.5 |
523 val smt_iter_fact_frac = Unsynchronized.ref 0.5 |
522 val smt_iter_time_frac = Unsynchronized.ref 0.5 |
524 val smt_iter_time_frac = Unsynchronized.ref 0.5 |
523 val smt_iter_min_msecs = Unsynchronized.ref 5000 |
525 val smt_iter_min_msecs = Unsynchronized.ref 5000 |
524 val smt_monomorph_limit = Unsynchronized.ref 4 |
526 val smt_monomorphize_limit = Unsynchronized.ref 4 |
525 |
527 |
526 fun smt_filter_loop name ({debug, verbose, overlord, timeout, ...} : params) |
528 fun smt_filter_loop name ({debug, verbose, overlord, timeout, ...} : params) |
527 state i smt_head = |
529 state i smt_head = |
528 let |
530 let |
529 val ctxt = Proof.context_of state |
531 val ctxt = Proof.context_of state |
538 Config.put SMT_Config.debug_files |
540 Config.put SMT_Config.debug_files |
539 (overlord_file_location_for_prover name |
541 (overlord_file_location_for_prover name |
540 |> (fn (path, base) => path ^ "/" ^ base)) |
542 |> (fn (path, base) => path ^ "/" ^ base)) |
541 else |
543 else |
542 I) |
544 I) |
543 #> Config.put SMT_Config.monomorph_limit (!smt_monomorph_limit) |
545 #> Config.put SMT_Config.infer_triggers (!smt_triggers) |
|
546 #> Config.put SMT_Config.monomorph_limit (!smt_monomorphize_limit) |
544 val state = state |> Proof.map_context repair_context |
547 val state = state |> Proof.map_context repair_context |
545 |
548 |
546 fun iter timeout iter_num outcome0 time_so_far facts = |
549 fun iter timeout iter_num outcome0 time_so_far facts = |
547 let |
550 let |
548 val timer = Timer.startRealTimer () |
551 val timer = Timer.startRealTimer () |