equal
deleted
inserted
replaced
50 smt_filter: (string * locality) SMT_Solver.smt_filter_data option} |
50 smt_filter: (string * locality) SMT_Solver.smt_filter_data option} |
51 |
51 |
52 type prover_result = |
52 type prover_result = |
53 {outcome: failure option, |
53 {outcome: failure option, |
54 used_facts: (string * locality) list, |
54 used_facts: (string * locality) list, |
55 run_time_in_msecs: int option, |
55 run_time_in_msecs: int, |
56 preplay: unit -> play, |
56 preplay: unit -> play, |
57 message: play -> string, |
57 message: play -> string, |
58 message_tail: string} |
58 message_tail: string} |
59 |
59 |
60 type prover = |
60 type prover = |
321 smt_filter: (string * locality) SMT_Solver.smt_filter_data option} |
321 smt_filter: (string * locality) SMT_Solver.smt_filter_data option} |
322 |
322 |
323 type prover_result = |
323 type prover_result = |
324 {outcome: failure option, |
324 {outcome: failure option, |
325 used_facts: (string * locality) list, |
325 used_facts: (string * locality) list, |
326 run_time_in_msecs: int option, |
326 run_time_in_msecs: int, |
327 preplay: unit -> play, |
327 preplay: unit -> play, |
328 message: play -> string, |
328 message: play -> string, |
329 message_tail: string} |
329 message_tail: string} |
330 |
330 |
331 type prover = |
331 type prover = |
795 "")) |
795 "")) |
796 end |
796 end |
797 | SOME failure => |
797 | SOME failure => |
798 ([], K (Failed_to_Play Metis), fn _ => string_for_failure failure, "") |
798 ([], K (Failed_to_Play Metis), fn _ => string_for_failure failure, "") |
799 in |
799 in |
800 {outcome = outcome, used_facts = used_facts, run_time_in_msecs = SOME msecs, |
800 {outcome = outcome, used_facts = used_facts, run_time_in_msecs = msecs, |
801 preplay = preplay, message = message, message_tail = message_tail} |
801 preplay = preplay, message = message, message_tail = message_tail} |
802 end |
802 end |
803 |
803 |
804 (* "SMT_Failure.Abnormal_Termination" carries the solver's return code. Until |
804 (* "SMT_Failure.Abnormal_Termination" carries the solver's return code. Until |
805 these are sorted out properly in the SMT module, we have to interpret these |
805 these are sorted out properly in the SMT module, we have to interpret these |
927 |> do_slice timeout (slice + 1) outcome0 time_so_far |
927 |> do_slice timeout (slice + 1) outcome0 time_so_far |
928 end |
928 end |
929 else |
929 else |
930 {outcome = if is_none outcome then NONE else the outcome0, |
930 {outcome = if is_none outcome then NONE else the outcome0, |
931 used_facts = used_facts, |
931 used_facts = used_facts, |
932 run_time_in_msecs = SOME (Time.toMilliseconds time_so_far)} |
932 run_time_in_msecs = Time.toMilliseconds time_so_far} |
933 end |
933 end |
934 in do_slice timeout 1 NONE Time.zeroTime end |
934 in do_slice timeout 1 NONE Time.zeroTime end |
935 |
935 |
936 fun run_smt_solver mode name (params as {debug, verbose, preplay_timeout, ...}) |
936 fun run_smt_solver mode name (params as {debug, verbose, preplay_timeout, ...}) |
937 minimize_command |
937 minimize_command |
967 choose_minimize_command minimize_command name preplay, |
967 choose_minimize_command minimize_command name preplay, |
968 subgoal, subgoal_count) |
968 subgoal, subgoal_count) |
969 in one_line_proof_text one_line_params end, |
969 in one_line_proof_text one_line_params end, |
970 if verbose then |
970 if verbose then |
971 "\nSMT solver real CPU time: " ^ |
971 "\nSMT solver real CPU time: " ^ |
972 string_from_time (Time.fromMilliseconds |
972 string_from_time (Time.fromMilliseconds run_time_in_msecs) ^ "." |
973 (the run_time_in_msecs)) ^ "." |
|
974 else |
973 else |
975 "") |
974 "") |
976 | SOME failure => |
975 | SOME failure => |
977 (K (Failed_to_Play Metis), fn _ => string_for_failure failure, "") |
976 (K (Failed_to_Play Metis), fn _ => string_for_failure failure, "") |
978 in |
977 in |
993 in |
992 in |
994 case play_one_line_proof debug timeout used_ths state subgoal |
993 case play_one_line_proof debug timeout used_ths state subgoal |
995 [reconstructor] of |
994 [reconstructor] of |
996 play as Played (_, time) => |
995 play as Played (_, time) => |
997 {outcome = NONE, used_facts = used_facts, |
996 {outcome = NONE, used_facts = used_facts, |
998 run_time_in_msecs = SOME (Time.toMilliseconds time), |
997 run_time_in_msecs = Time.toMilliseconds time, |
999 preplay = K play, |
998 preplay = K play, |
1000 message = fn play => |
999 message = fn play => |
1001 let |
1000 let |
1002 val one_line_params = |
1001 val one_line_params = |
1003 (play, proof_banner mode name, used_facts, |
1002 (play, proof_banner mode name, used_facts, |
1006 message_tail = ""} |
1005 message_tail = ""} |
1007 | play => |
1006 | play => |
1008 let |
1007 let |
1009 val failure = case play of Failed_to_Play _ => GaveUp | _ => TimedOut |
1008 val failure = case play of Failed_to_Play _ => GaveUp | _ => TimedOut |
1010 in |
1009 in |
1011 {outcome = SOME failure, used_facts = [], run_time_in_msecs = NONE, |
1010 {outcome = SOME failure, used_facts = [], run_time_in_msecs = ~1, |
1012 preplay = K play, message = fn _ => string_for_failure failure, |
1011 preplay = K play, message = fn _ => string_for_failure failure, |
1013 message_tail = ""} |
1012 message_tail = ""} |
1014 end |
1013 end |
1015 end |
1014 end |
1016 |
1015 |