117 (* possible invocations *) |
117 (* possible invocations *) |
118 |
118 |
119 (** quickcheck **) |
119 (** quickcheck **) |
120 |
120 |
121 fun invoke_quickcheck change_options quickcheck_generator thy t = |
121 fun invoke_quickcheck change_options quickcheck_generator thy t = |
122 TimeLimit.timeLimit (seconds (!Auto_Tools.time_limit)) |
122 TimeLimit.timeLimit (seconds (!Try.auto_time_limit)) |
123 (fn _ => |
123 (fn _ => |
124 let |
124 let |
125 val [result] = Quickcheck.test_goal_terms (change_options (Proof_Context.init_global thy)) |
125 val [result] = Quickcheck.test_goal_terms (change_options (Proof_Context.init_global thy)) |
126 (false, false) [] [(t, [])] |
126 (false, false) [] [(t, [])] |
127 in |
127 in |
128 case Quickcheck.counterexample_of result of |
128 case Quickcheck.counterexample_of result of |
129 NONE => (NoCex, Quickcheck.timings_of result) |
129 NONE => (NoCex, Quickcheck.timings_of result) |
130 | SOME _ => (GenuineCex, Quickcheck.timings_of result) |
130 | SOME _ => (GenuineCex, Quickcheck.timings_of result) |
131 end) () |
131 end) () |
132 handle TimeLimit.TimeOut => |
132 handle TimeLimit.TimeOut => |
133 (Timeout, [("timelimit", Real.floor (!Auto_Tools.time_limit))]) |
133 (Timeout, [("timelimit", Real.floor (!Try.auto_time_limit))]) |
134 |
134 |
135 fun quickcheck_mtd change_options quickcheck_generator = |
135 fun quickcheck_mtd change_options quickcheck_generator = |
136 ("quickcheck_" ^ quickcheck_generator, invoke_quickcheck change_options quickcheck_generator) |
136 ("quickcheck_" ^ quickcheck_generator, invoke_quickcheck change_options quickcheck_generator) |
137 |
137 |
138 (** solve direct **) |
138 (** solve direct **) |