author | blanchet |
Thu, 26 Apr 2012 01:05:06 +0200 | |
changeset 47776 | 024cf0f7fb6d |
parent 47771 | ba321ce6f344 |
child 47785 | d27bb852c430 |
permissions | -rw-r--r-- |
46324 | 1 |
(* Title: HOL/TPTP/atp_problem_import.ML |
2 |
Author: Jasmin Blanchette, TU Muenchen |
|
3 |
Copyright 2012 |
|
4 |
||
5 |
Import TPTP problems as Isabelle terms or goals. |
|
6 |
*) |
|
7 |
||
8 |
signature ATP_PROBLEM_IMPORT = |
|
9 |
sig |
|
47670 | 10 |
val nitpick_tptp_file : int -> string -> unit |
11 |
val refute_tptp_file : int -> string -> unit |
|
12 |
val sledgehammer_tptp_file : int -> string -> unit |
|
47765 | 13 |
val isabelle_tptp_file : int -> string -> unit |
46325 | 14 |
val translate_tptp_file : string -> string -> string -> unit |
46324 | 15 |
end; |
16 |
||
17 |
structure ATP_Problem_Import : ATP_PROBLEM_IMPORT = |
|
18 |
struct |
|
19 |
||
47643
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
20 |
open ATP_Util |
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
21 |
open ATP_Problem |
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
22 |
open ATP_Proof |
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
23 |
|
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
24 |
val debug = false |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
25 |
val overlord = false |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
26 |
|
47643
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
27 |
|
47771 | 28 |
(** TPTP parsing **) |
47643
e33c2be488fe
reintroduced old FOF and CNF parsers, to work around TPTP_Parser failures
blanchet
parents:
47565
diff
changeset
|
29 |
|
47565
762eb0dacaa6
remove old TPTP CNF/FOF parser; always use Nik's new parser
blanchet
parents:
47562
diff
changeset
|
30 |
(* cf. "close_form" in "refute.ML" *) |
762eb0dacaa6
remove old TPTP CNF/FOF parser; always use Nik's new parser
blanchet
parents:
47562
diff
changeset
|
31 |
fun close_form t = |
762eb0dacaa6
remove old TPTP CNF/FOF parser; always use Nik's new parser
blanchet
parents:
47562
diff
changeset
|
32 |
fold (fn ((s, i), T) => fn t' => |
762eb0dacaa6
remove old TPTP CNF/FOF parser; always use Nik's new parser
blanchet
parents:
47562
diff
changeset
|
33 |
Logic.all_const T $ Abs (s, T, abstract_over (Var ((s, i), T), t'))) |
762eb0dacaa6
remove old TPTP CNF/FOF parser; always use Nik's new parser
blanchet
parents:
47562
diff
changeset
|
34 |
(Term.add_vars t []) t |
46324 | 35 |
|
47557
32f35b3d9e42
started integrating Nik's parser into TPTP command-line tools
blanchet
parents:
46325
diff
changeset
|
36 |
fun read_tptp_file thy file_name = |
47644 | 37 |
let |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
38 |
fun has_role role (_, role', _, _) = (role' = role) |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
39 |
fun get_prop (_, _, P, _) = P |> Logic.varify_global |> close_form |
47644 | 40 |
val path = |
41 |
Path.explode file_name |
|
42 |
|> (fn path => |
|
43 |
path |> not (Path.is_absolute path) |
|
44 |
? Path.append (Path.explode "$PWD")) |
|
47714 | 45 |
val ((_, _, problem), thy) = |
46 |
TPTP_Interpret.interpret_file true (Path.explode "$TPTP") path [] [] thy |
|
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
47 |
val (conjs, defs_and_nondefs) = |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
48 |
problem |> List.partition (has_role TPTP_Syntax.Role_Conjecture) |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
49 |
||> List.partition (has_role TPTP_Syntax.Role_Definition) |
47644 | 50 |
in |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
51 |
(map get_prop conjs, pairself (map get_prop) defs_and_nondefs, |
47771 | 52 |
thy |> Theory.checkpoint |> Proof_Context.init_global) |
47557
32f35b3d9e42
started integrating Nik's parser into TPTP command-line tools
blanchet
parents:
46325
diff
changeset
|
53 |
end |
46325 | 54 |
|
47771 | 55 |
|
46324 | 56 |
(** Nitpick (alias Nitrox) **) |
57 |
||
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
58 |
fun aptrueprop f ((t0 as @{const Trueprop}) $ t1) = t0 $ f t1 |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
59 |
| aptrueprop f t = f t |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
60 |
|
47670 | 61 |
fun nitpick_tptp_file timeout file_name = |
46325 | 62 |
let |
47771 | 63 |
val (conjs, (defs, nondefs), ctxt) = read_tptp_file @{theory} file_name |
64 |
val thy = Proof_Context.theory_of ctxt |
|
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
65 |
val defs = defs |> map (ATP_Util.extensionalize_term ctxt |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
66 |
#> aptrueprop (open_form I)) |
47714 | 67 |
val state = Proof.init ctxt |
46325 | 68 |
val params = |
47557
32f35b3d9e42
started integrating Nik's parser into TPTP command-line tools
blanchet
parents:
46325
diff
changeset
|
69 |
[("card", "1\<emdash>100"), |
46325 | 70 |
("box", "false"), |
71 |
("sat_solver", "smart"), |
|
72 |
("max_threads", "1"), |
|
73 |
("batch_size", "10"), |
|
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
74 |
("falsify", if null conjs then "false" else "true"), |
46325 | 75 |
("verbose", "true"), |
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
76 |
("debug", if debug then "true" else "false"), |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
77 |
("overlord", if overlord then "true" else "false"), |
46325 | 78 |
("show_consts", "true"), |
47755 | 79 |
("format", "1"), |
46325 | 80 |
("max_potential", "0"), |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
81 |
("timeout", string_of_int timeout), |
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
82 |
("tac_timeout", string_of_int ((timeout + 49) div 50))] |
47714 | 83 |
|> Nitpick_Isar.default_params thy |
46325 | 84 |
val i = 1 |
85 |
val n = 1 |
|
86 |
val step = 0 |
|
87 |
val subst = [] |
|
88 |
in |
|
47715
04400144c6fc
handle TPTP definitions as definitions in Nitpick rather than as axioms
blanchet
parents:
47714
diff
changeset
|
89 |
Nitpick.pick_nits_in_term state params Nitpick.TPTP i n step subst |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
90 |
defs nondefs (case conjs of conj :: _ => conj | [] => @{prop True}); |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
91 |
() |
46325 | 92 |
end |
46324 | 93 |
|
94 |
||
95 |
(** Refute **) |
|
96 |
||
47670 | 97 |
fun refute_tptp_file timeout file_name = |
46325 | 98 |
let |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
99 |
fun print_szs_from_outcome falsify s = |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
100 |
"% SZS status " ^ |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
101 |
(if s = "genuine" then |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
102 |
if falsify then "CounterSatisfiable" else "Satisfiable" |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
103 |
else |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
104 |
"Unknown") |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
105 |
|> writeln |
47771 | 106 |
val (conjs, (defs, nondefs), ctxt) = read_tptp_file @{theory} file_name |
46325 | 107 |
val params = |
47714 | 108 |
[("maxtime", string_of_int timeout), |
109 |
("maxvars", "100000")] |
|
46325 | 110 |
in |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
111 |
Refute.refute_term ctxt params (defs @ nondefs) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
112 |
(case conjs of conj :: _ => conj | [] => @{prop True}) |
47718
39229c760636
smoother handling of conjecture, so that its Skolem constants get displayed in countermodels
blanchet
parents:
47715
diff
changeset
|
113 |
|> print_szs_from_outcome (not (null conjs)) |
46325 | 114 |
end |
46324 | 115 |
|
116 |
||
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
117 |
(** Sledgehammer and Isabelle (combination of provers) **) |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
118 |
|
47771 | 119 |
val cvc3N = "cvc3" |
120 |
val z3N = "z3" |
|
121 |
||
122 |
fun can_tac ctxt tactic conj = |
|
123 |
can (Goal.prove ctxt [] [] conj) (K tactic) |
|
124 |
||
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
125 |
fun SOLVE_TIMEOUT seconds name tac st = |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
126 |
let |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
127 |
val result = |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
128 |
TimeLimit.timeLimit (Time.fromSeconds seconds) |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
129 |
(fn () => SINGLE (SOLVE tac) st) () |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
130 |
handle TimeLimit.TimeOut => NONE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
131 |
| ERROR _ => NONE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
132 |
in |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
133 |
(case result of |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
134 |
NONE => (warning ("FAILURE: " ^ name); Seq.empty) |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
135 |
| SOME st' => (warning ("SUCCESS: " ^ name); Seq.single st')) |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
136 |
end |
46324 | 137 |
|
47771 | 138 |
val i = 1 |
46324 | 139 |
|
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
140 |
fun atp_tac ctxt timeout prover = |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
141 |
Sledgehammer_Tactics.sledgehammer_as_oracle_tac ctxt |
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
142 |
[("debug", if debug then "true" else "false"), |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
143 |
("overlord", if overlord then "true" else "false"), |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
144 |
("provers", prover), |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
145 |
("timeout", string_of_int timeout)] |
47771 | 146 |
{add = [], del = [], only = true} i |
47765 | 147 |
|
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
148 |
fun sledgehammer_tac ctxt timeout = |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
149 |
let |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
150 |
fun slice timeout prover = |
47771 | 151 |
SOLVE_TIMEOUT timeout prover (atp_tac ctxt timeout prover) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
152 |
in |
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
153 |
slice timeout ATP_Systems.satallaxN |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
154 |
ORELSE |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
155 |
slice (timeout div 10) ATP_Systems.spassN |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
156 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
157 |
slice (timeout div 10) z3N |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
158 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
159 |
slice (timeout div 10) ATP_Systems.vampireN |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
160 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
161 |
slice (timeout div 10) ATP_Systems.eN |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
162 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
163 |
slice (timeout div 10) cvc3N |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
164 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
165 |
slice (timeout div 10) ATP_Systems.leo2N |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
166 |
end |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
167 |
|
47771 | 168 |
fun auto_etc_tac ctxt timeout = |
169 |
SOLVE_TIMEOUT (timeout div 10) "simp" (asm_full_simp_tac (simpset_of ctxt) i) |
|
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
170 |
ORELSE |
47771 | 171 |
SOLVE_TIMEOUT (timeout div 10) "blast" (blast_tac ctxt i) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
172 |
ORELSE |
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
173 |
SOLVE_TIMEOUT (timeout div 20) "auto+spass" |
47771 | 174 |
(auto_tac ctxt THEN atp_tac ctxt (timeout div 20) ATP_Systems.spassN) |
175 |
ORELSE |
|
176 |
SOLVE_TIMEOUT (timeout div 20) "fast" (fast_tac ctxt i) |
|
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
177 |
ORELSE |
47771 | 178 |
SOLVE_TIMEOUT (timeout div 20) "best" (best_tac ctxt i) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
179 |
ORELSE |
47771 | 180 |
SOLVE_TIMEOUT (timeout div 20) "force" (force_tac ctxt i) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
181 |
ORELSE |
47771 | 182 |
SOLVE_TIMEOUT (timeout div 20) "arith" (Arith_Data.arith_tac ctxt i) |
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
183 |
ORELSE |
47771 | 184 |
SOLVE_TIMEOUT timeout "fastforce" (fast_force_tac ctxt i) |
185 |
||
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
186 |
fun make_conj (defs, nondefs) conjs = |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
187 |
Logic.list_implies (rev defs @ rev nondefs, |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
188 |
case conjs of conj :: _ => conj | [] => @{prop False}) |
47771 | 189 |
|
190 |
fun print_szs_from_success conjs success = |
|
191 |
writeln ("% SZS status " ^ |
|
192 |
(if success then |
|
193 |
if null conjs then "Unsatisfiable" else "Theorem" |
|
194 |
else |
|
195 |
"% SZS status Unknown")) |
|
47765 | 196 |
|
47771 | 197 |
fun sledgehammer_tptp_file timeout file_name = |
198 |
let |
|
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
199 |
val (conjs, assms, ctxt) = read_tptp_file @{theory} file_name |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
200 |
val conj = make_conj assms conjs |
47771 | 201 |
in |
202 |
can_tac ctxt (sledgehammer_tac ctxt timeout) conj |
|
203 |
|> print_szs_from_success conjs |
|
204 |
end |
|
47766
9f7cdd5fff7c
more work on TPTP Isabelle and Sledgehammer tactics
blanchet
parents:
47765
diff
changeset
|
205 |
|
47771 | 206 |
fun isabelle_tptp_file timeout file_name = |
207 |
let |
|
47776
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
208 |
val (conjs, assms, ctxt) = read_tptp_file @{theory} file_name |
024cf0f7fb6d
further tweaking for Satallax, so that TPTP problems before parsing and after generation are as similar as possible/practical
blanchet
parents:
47771
diff
changeset
|
209 |
val conj = make_conj assms conjs |
47771 | 210 |
in |
211 |
(can_tac ctxt (sledgehammer_tac ctxt (timeout div 2)) conj orelse |
|
212 |
can_tac ctxt (auto_etc_tac ctxt (timeout div 2)) conj orelse |
|
213 |
can_tac ctxt (atp_tac ctxt timeout ATP_Systems.satallaxN) conj) |
|
214 |
|> print_szs_from_success conjs |
|
215 |
end |
|
46324 | 216 |
|
217 |
(** Translator between TPTP(-like) file formats **) |
|
218 |
||
46325 | 219 |
fun translate_tptp_file format in_file_name out_file_name = () |
46324 | 220 |
|
221 |
end; |