1 (* Title: HOL/ex/CASC_Setup.thy
2 Author: Jasmin Blanchette
5 Setup for Isabelle, Nitpick, and Refute for participating at CASC in the THF and
6 TNT divisions. This theory file should be loaded by the Isabelle theory files
7 generated by Geoff Sutcliffe's TPTP2X tool from the original THF0 files.
12 uses "sledgehammer_tactics.ML"
15 declare mem_def [simp add]
17 declare [[smt_oracle]]
19 refute_params [maxtime = 10000, no_assms, expect = genuine]
20 nitpick_params [timeout = none, card = 1-50, verbose, dont_box, no_assms,
21 batch_size = 1, expect = genuine]
23 ML {* Proofterm.proofs := 0 *}
26 fun SOLVE_TIMEOUT seconds name tac st =
29 TimeLimit.timeLimit (Time.fromSeconds seconds)
30 (fn () => SINGLE (SOLVE tac) st) ()
31 handle TimeLimit.TimeOut => NONE
35 NONE => (warning ("FAILURE: " ^ name); Seq.empty)
36 | SOME st' => (warning ("SUCCESS: " ^ name); Seq.single st'))
41 fun isabellep_tac ctxt max_secs =
42 SOLVE_TIMEOUT (max_secs div 10) "smt" (ALLGOALS (SMT_Solver.smt_tac ctxt []))
44 SOLVE_TIMEOUT (max_secs div 5) "sledgehammer"
45 (ALLGOALS (Sledgehammer_Tactics.sledgehammer_as_oracle_tac ctxt))
47 SOLVE_TIMEOUT (max_secs div 10) "simp" (ALLGOALS (asm_full_simp_tac (simpset_of ctxt)))
49 SOLVE_TIMEOUT (max_secs div 20) "blast" (ALLGOALS (blast_tac ctxt))
51 SOLVE_TIMEOUT (max_secs div 10) "auto" (auto_tac ctxt
52 THEN ALLGOALS (Sledgehammer_Tactics.sledgehammer_as_oracle_tac ctxt))
54 SOLVE_TIMEOUT (max_secs div 10) "metis"
55 (ALLGOALS (Metis_Tactics.metis_tac [] ctxt []))
57 SOLVE_TIMEOUT (max_secs div 10) "fast" (ALLGOALS (fast_tac ctxt))
59 SOLVE_TIMEOUT (max_secs div 10) "best" (ALLGOALS (best_tac ctxt))
61 SOLVE_TIMEOUT (max_secs div 10) "force" (ALLGOALS (force_tac ctxt))
63 SOLVE_TIMEOUT max_secs "fastsimp" (ALLGOALS (fast_simp_tac ctxt))
66 method_setup isabellep = {*
67 Scan.lift (Scan.optional Parse.nat 1) >>
68 (fn m => fn ctxt => SIMPLE_METHOD (isabellep_tac ctxt m))
69 *} "combination of Isabelle provers and oracles for CASC"