author | paulson |
Wed, 20 Jul 2005 17:00:28 +0200 | |
changeset 16897 | 7e5319d0f418 |
parent 16802 | 6eeee59dac4c |
child 16904 | 6fb188ca5f91 |
permissions | -rw-r--r-- |
15608 | 1 |
(* Author: Jia Meng, Cambridge University Computer Laboratory |
2 |
ID: $Id$ |
|
3 |
Copyright 2004 University of Cambridge |
|
15347 | 4 |
|
5 |
ATPs with TPTP format input. |
|
6 |
*) |
|
15452 | 7 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
8 |
signature RES_ATP = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
9 |
sig |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
10 |
val call_atp: bool ref |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
11 |
val trace_res : bool ref |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
12 |
val traceflag : bool ref |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
13 |
val axiom_file : Path.T |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
14 |
val hyps_file : Path.T |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
15 |
val prob_file : Path.T; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
16 |
(*val atp_ax_tac : thm list -> int -> Tactical.tactic*) |
15644 | 17 |
(*val atp_tac : int -> Tactical.tactic*) |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
18 |
val debug: bool ref |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
19 |
val full_spass: bool ref |
16478 | 20 |
(*val spass: bool ref*) |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
21 |
val vampire: bool ref |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
22 |
val custom_spass: string list ref |
15347 | 23 |
end; |
24 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
25 |
structure ResAtp: RES_ATP = |
15347 | 26 |
struct |
27 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
28 |
val call_atp = ref false; |
15644 | 29 |
|
15779
aed221aff642
Removed remaining references to Main.thy in reconstruction code.
quigley
parents:
15774
diff
changeset
|
30 |
val traceflag = ref true; |
16357 | 31 |
val debug = ref false; |
16172
629ba53a072f
small tweaks; also now write_out_clasimp takes the current theory as argument
paulson
parents:
16156
diff
changeset
|
32 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
33 |
fun debug_tac tac = (warning "testing"; tac); |
16478 | 34 |
|
16357 | 35 |
val full_spass = ref false; |
16478 | 36 |
|
37 |
(* use spass as default prover *) |
|
38 |
(*val spass = ref true;*) |
|
39 |
||
16520 | 40 |
val custom_spass = ref ["Auto=0","-IORe","-IOFc","-RTaut","-RFSub","-RBSub","-DocProof","-TimeLimit=60"]; |
16478 | 41 |
val vampire = ref false; |
42 |
||
15608 | 43 |
val trace_res = ref false; |
15347 | 44 |
|
15608 | 45 |
val skolem_tac = skolemize_tac; |
46 |
||
15644 | 47 |
val num_of_clauses = ref 0; |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
48 |
val clause_arr = Array.array (3500, ("empty", 0)); |
15644 | 49 |
|
15347 | 50 |
|
15608 | 51 |
val atomize_tac = |
52 |
SUBGOAL |
|
53 |
(fn (prop,_) => |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
54 |
let val ts = Logic.strip_assums_hyp prop |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
55 |
in EVERY1 |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
56 |
[METAHYPS |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
57 |
(fn hyps => (cut_facts_tac (map (ObjectLogic.atomize_thm o forall_intr_vars) hyps) 1)), |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
58 |
REPEAT_DETERM_N (length ts) o (etac thin_rl)] |
15608 | 59 |
end); |
15347 | 60 |
|
15608 | 61 |
(* temporarily use these files, which will be loaded by Vampire *) |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
62 |
val file_id_num = ref 0; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
63 |
fun new_prob_file () = "prob" ^ string_of_int (inc file_id_num); |
15347 | 64 |
|
15644 | 65 |
val axiom_file = File.tmp_path (Path.basic "axioms"); |
66 |
val clasimp_file = File.tmp_path (Path.basic "clasimp"); |
|
67 |
val hyps_file = File.tmp_path (Path.basic "hyps"); |
|
68 |
val prob_file = File.tmp_path (Path.basic "prob"); |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
69 |
val dummy_tac = all_tac; |
15644 | 70 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
71 |
|
15347 | 72 |
(**** for Isabelle/ML interface ****) |
73 |
||
16897 | 74 |
(*Remove unwanted characters such as ? and newline from the textural |
75 |
representation of a theorem (surely they don't need to be produced in |
|
76 |
the first place?) *) |
|
15608 | 77 |
|
16897 | 78 |
fun is_proof_char ch = (#" " <= ch andalso ch <= #"~" andalso ch <> #"?"); |
79 |
||
80 |
val proofstring = |
|
81 |
String.translate (fn c => if is_proof_char c then str c else ""); |
|
15608 | 82 |
|
15452 | 83 |
|
15644 | 84 |
(* |
85 |
fun call_atp_tac thms n = (tptp_inputs thms ; dummy_tac); |
|
15347 | 86 |
|
15644 | 87 |
*) |
15347 | 88 |
|
89 |
(**** For running in Isar ****) |
|
90 |
||
15608 | 91 |
(* same function as that in res_axioms.ML *) |
92 |
fun repeat_RS thm1 thm2 = |
|
93 |
let val thm1' = thm1 RS thm2 handle THM _ => thm1 |
|
94 |
in |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
95 |
if eq_thm(thm1,thm1') then thm1' else (repeat_RS thm1' thm2) |
15608 | 96 |
end; |
97 |
||
98 |
(* a special version of repeat_RS *) |
|
99 |
fun repeat_someI_ex thm = repeat_RS thm someI_ex; |
|
100 |
||
15644 | 101 |
(*********************************************************************) |
15608 | 102 |
(* convert clauses from "assume" to conjecture. write to file "hyps" *) |
15644 | 103 |
(* hypotheses of the goal currently being proved *) |
104 |
(*********************************************************************) |
|
16767 | 105 |
(*perhaps have 2 different versions of this, depending on whether or not SpassComm.spass is set *) |
15608 | 106 |
fun isar_atp_h thms = |
107 |
let val prems = map (skolemize o make_nnf o ObjectLogic.atomize_thm) thms |
|
15644 | 108 |
val prems' = map repeat_someI_ex prems |
109 |
val prems'' = make_clauses prems' |
|
110 |
val prems''' = ResAxioms.rm_Eps [] prems'' |
|
111 |
val clss = map ResClause.make_conjecture_clause prems''' |
|
15774 | 112 |
val (tptp_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2tptp clss) |
15608 | 113 |
val tfree_lits = ResLib.flat_noDup tfree_litss |
16767 | 114 |
(* tfree clause is different in tptp and dfg versions *) |
15608 | 115 |
val tfree_clss = map ResClause.tfree_clause tfree_lits |
16259 | 116 |
val hypsfile = File.platform_path hyps_file |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
117 |
val out = TextIO.openOut(hypsfile) |
15608 | 118 |
in |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
119 |
(ResLib.writeln_strs out (tfree_clss @ tptp_clss); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
120 |
TextIO.closeOut out; if !trace_res then (warning hypsfile) else ()); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
121 |
tfree_lits |
15608 | 122 |
end; |
15347 | 123 |
|
15644 | 124 |
|
125 |
(*********************************************************************) |
|
126 |
(* write out a subgoal as tptp clauses to the file "probN" *) |
|
127 |
(* where N is the number of this subgoal *) |
|
128 |
(*********************************************************************) |
|
129 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
130 |
fun tptp_inputs_tfrees thms n tfrees = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
131 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
132 |
val _ = warning ("in tptp_inputs_tfrees 0") |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
133 |
val clss = map (ResClause.make_conjecture_clause_thm) thms |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
134 |
val _ = warning ("in tptp_inputs_tfrees 1") |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
135 |
val (tptp_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2tptp clss) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
136 |
val _ = warning ("in tptp_inputs_tfrees 2") |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
137 |
val tfree_clss = map ResClause.tfree_clause ((ResLib.flat_noDup tfree_litss) \\ tfrees) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
138 |
val _ = warning ("in tptp_inputs_tfrees 3") |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
139 |
val probfile = File.platform_path prob_file ^ "_" ^ string_of_int n |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
140 |
val out = TextIO.openOut(probfile) |
15608 | 141 |
in |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
142 |
ResLib.writeln_strs out (tfree_clss @ tptp_clss); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
143 |
TextIO.closeOut out; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
144 |
if !trace_res then (warning probfile) else () |
15608 | 145 |
end; |
15452 | 146 |
|
15608 | 147 |
|
16767 | 148 |
(*********************************************************************) |
149 |
(* write out a subgoal as DFG clauses to the file "probN" *) |
|
150 |
(* where N is the number of this subgoal *) |
|
151 |
(*********************************************************************) |
|
152 |
(* |
|
153 |
fun dfg_inputs_tfrees thms n tfrees = |
|
154 |
let val _ = (warning ("in dfg_inputs_tfrees 0")) |
|
155 |
val clss = map (ResClause.make_conjecture_clause_thm) thms |
|
156 |
val _ = (warning ("in dfg_inputs_tfrees 1")) |
|
157 |
val (dfg_clss,tfree_litss) = ListPair.unzip (map ResClause.clause2dfg clss) |
|
158 |
val _ = (warning ("in dfg_inputs_tfrees 2")) |
|
159 |
val tfree_clss = map ResClause.tfree_clause ((ResLib.flat_noDup tfree_litss) \\ tfrees) |
|
160 |
val _ = (warning ("in dfg_inputs_tfrees 3")) |
|
161 |
val probfile = (File.platform_path prob_file) ^ "_" ^ (string_of_int n) |
|
162 |
val out = TextIO.openOut(probfile) |
|
163 |
in |
|
164 |
(ResLib.writeln_strs out (tfree_clss @ dfg_clss); TextIO.closeOut out; (if !trace_res then (warning probfile) else ())) |
|
165 |
end;*) |
|
16357 | 166 |
|
15644 | 167 |
(*********************************************************************) |
168 |
(* call SPASS with settings and problem file for the current subgoal *) |
|
169 |
(* should be modified to allow other provers to be called *) |
|
170 |
(*********************************************************************) |
|
16357 | 171 |
(* now passing in list of skolemized thms and list of sgterms to go with them *) |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
172 |
fun call_resolve_tac (thms: thm list list) sign (sg_terms: term list) (childin, childout,pid) n = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
173 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
174 |
val axfile = (File.platform_path axiom_file) |
16520 | 175 |
|
176 |
val hypsfile = (File.platform_path hyps_file) |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
177 |
val clasimpfile = (File.platform_path clasimp_file) |
16520 | 178 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
179 |
fun make_atp_list [] sign n = [] |
16897 | 180 |
| make_atp_list ((sko_thm, sg_term)::xs) sign n = |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
181 |
let |
16897 | 182 |
val thmstr = proofstring (Meson.concat_with_and (map string_of_thm sko_thm)) |
183 |
val _ = warning ("thmstring in make_atp_lists is " ^ thmstr) |
|
15608 | 184 |
|
16897 | 185 |
val goalstring = proofstring (Sign.string_of_term sign sg_term) |
186 |
val _ = warning ("goalstring in make_atp_lists is " ^ goalstring) |
|
16357 | 187 |
|
16897 | 188 |
val probfile = File.platform_path prob_file ^ "_" ^ (string_of_int n) |
189 |
val _ = warning ("prob file in call_resolve_tac is " ^ probfile) |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
190 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
191 |
if !SpassComm.spass |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
192 |
then |
16897 | 193 |
let val optionline = (*Custom SPASS options, or default?*) |
194 |
if !full_spass (*Auto mode: all SPASS inference rules*) |
|
195 |
then "-DocProof%-TimeLimit=60%-SOS" |
|
196 |
else "-" ^ space_implode "%-" (!custom_spass) |
|
197 |
val _ = warning ("SPASS option string is " ^ optionline) |
|
198 |
val _ = ResLib.helper_path "SPASS_HOME" "SPASS" |
|
199 |
(*We've checked that SPASS is there for ATP/spassshell to run.*) |
|
200 |
in |
|
201 |
([("spass", thmstr, goalstring, |
|
202 |
getenv "ISABELLE_HOME" ^ "/src/HOL/Tools/ATP/spassshell", |
|
203 |
optionline, clasimpfile, axfile, hypsfile, probfile)] @ |
|
204 |
(make_atp_list xs sign (n+1))) |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
205 |
end |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
206 |
else |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
207 |
let val vampire = ResLib.helper_path "VAMPIRE_HOME" "vkernel" |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
208 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
209 |
([("vampire", thmstr, goalstring, vampire, "-t 60%-m 100000", |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
210 |
clasimpfile, axfile, hypsfile, probfile)] @ |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
211 |
(make_atp_list xs sign (n+1))) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
212 |
end |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
213 |
end |
15452 | 214 |
|
16897 | 215 |
val atp_list = make_atp_list (ListPair.zip (thms, sg_terms)) sign 1 |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
216 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
217 |
Watcher.callResProvers(childout,atp_list); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
218 |
warning "Sent commands to watcher!"; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
219 |
dummy_tac |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
220 |
end |
16357 | 221 |
|
15644 | 222 |
(**********************************************************) |
223 |
(* write out the current subgoal as a tptp file, probN, *) |
|
224 |
(* then call dummy_tac - should be call_res_tac *) |
|
225 |
(**********************************************************) |
|
15679
28eb0fe50533
Integrating the reconstruction files into the building of HOL
quigley
parents:
15657
diff
changeset
|
226 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
227 |
fun get_sko_thms tfrees sign sg_terms (childin, childout, pid) thm n sko_thms = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
228 |
if n = 0 then |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
229 |
(call_resolve_tac (rev sko_thms) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
230 |
sign sg_terms (childin, childout, pid) (List.length sg_terms); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
231 |
dummy_tac thm) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
232 |
else |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
233 |
SELECT_GOAL |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
234 |
(EVERY1 [rtac ccontr, atomize_tac, skolemize_tac, |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
235 |
METAHYPS (fn negs => |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
236 |
(tptp_inputs_tfrees (make_clauses negs) n tfrees; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
237 |
get_sko_thms tfrees sign sg_terms (childin, childout, pid) thm (n - 1) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
238 |
(negs::sko_thms); dummy_tac))]) n thm; |
15644 | 239 |
|
240 |
||
241 |
(**********************************************) |
|
242 |
(* recursively call atp_tac_g on all subgoals *) |
|
243 |
(* sg_term is the nth subgoal as a term - used*) |
|
244 |
(* in proof reconstruction *) |
|
245 |
(**********************************************) |
|
246 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
247 |
fun isar_atp_goal' thm n tfree_lits (childin, childout, pid) = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
248 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
249 |
val prems = Thm.prems_of thm |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
250 |
(*val sg_term = get_nth k prems*) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
251 |
val sign = sign_of_thm thm |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
252 |
val thmstring = string_of_thm thm |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
253 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
254 |
warning("in isar_atp_goal'"); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
255 |
warning("thmstring in isar_atp_goal': " ^ thmstring); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
256 |
(* go and call callResProvers with this subgoal *) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
257 |
(* isar_atp_g tfree_lits sg_term (childin, childout, pid) k thm; *) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
258 |
(* recursive call to pick up the remaining subgoals *) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
259 |
(* isar_atp_goal' thm (k+1) n tfree_lits (childin, childout, pid) *) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
260 |
get_sko_thms tfree_lits sign prems (childin, childout, pid) thm n [] |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
261 |
end; |
16520 | 262 |
|
15644 | 263 |
|
264 |
(**************************************************) |
|
265 |
(* convert clauses from "assume" to conjecture. *) |
|
266 |
(* i.e. apply make_clauses and then get tptp for *) |
|
15679
28eb0fe50533
Integrating the reconstruction files into the building of HOL
quigley
parents:
15657
diff
changeset
|
267 |
(* any hypotheses in the goal produced by assume *) |
28eb0fe50533
Integrating the reconstruction files into the building of HOL
quigley
parents:
15657
diff
changeset
|
268 |
(* statements; *) |
15644 | 269 |
(* write to file "hyps" *) |
270 |
(**************************************************) |
|
271 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
272 |
fun isar_atp_aux thms thm n_subgoals (childin, childout, pid) = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
273 |
let val tfree_lits = isar_atp_h thms |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
274 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
275 |
warning ("in isar_atp_aux"); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
276 |
isar_atp_goal' thm n_subgoals tfree_lits (childin, childout, pid) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
277 |
end; |
15644 | 278 |
|
279 |
(******************************************************************) |
|
280 |
(* called in Isar automatically *) |
|
281 |
(* writes out the current clasimpset to a tptp file *) |
|
282 |
(* passes all subgoals on to isar_atp_aux for further processing *) |
|
283 |
(* turns off xsymbol at start of function, restoring it at end *) |
|
284 |
(******************************************************************) |
|
15779
aed221aff642
Removed remaining references to Main.thy in reconstruction code.
quigley
parents:
15774
diff
changeset
|
285 |
(*FIX changed to clasimp_file *) |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
286 |
val isar_atp' = setmp print_mode [] (fn (ctxt, thms, thm) => |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
287 |
if Thm.no_prems thm then () |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
288 |
else |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
289 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
290 |
val _= warning ("in isar_atp'") |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
291 |
val thy = ProofContext.theory_of ctxt |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
292 |
val prems = Thm.prems_of thm |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
293 |
val thms_string = Meson.concat_with_and (map string_of_thm thms) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
294 |
val thm_string = string_of_thm thm |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
295 |
val prems_string = Meson.concat_with_and (map (Sign.string_of_term thy) prems) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
296 |
|
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
297 |
(*set up variables for writing out the clasimps to a tptp file*) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
298 |
val (clause_arr, num_of_clauses) = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
299 |
ResClasimp.write_out_clasimp (File.platform_path clasimp_file) thy |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
300 |
(hd prems) (*FIXME: hack!! need to do all prems*) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
301 |
val _ = warning ("clasimp_file is " ^ File.platform_path clasimp_file) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
302 |
val (childin, childout, pid) = Watcher.createWatcher (thm, clause_arr, num_of_clauses) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
303 |
val pid_string = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
304 |
string_of_int (Word.toInt (Word.fromLargeWord (Posix.Process.pidToWord pid))) |
15608 | 305 |
in |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
306 |
warning ("initial thms: " ^ thms_string); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
307 |
warning ("initial thm: " ^ thm_string); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
308 |
warning ("subgoals: " ^ prems_string); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
309 |
warning ("pid: "^ pid_string); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
310 |
isar_atp_aux thms thm (length prems) (childin, childout, pid); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
311 |
() |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
312 |
end); |
15608 | 313 |
|
15452 | 314 |
|
15608 | 315 |
fun get_thms_cs claset = |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
316 |
let val {safeEs, safeIs, hazEs, hazIs, ...} = rep_cs claset |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
317 |
in safeEs @ safeIs @ hazEs @ hazIs end; |
16357 | 318 |
|
15608 | 319 |
fun append_name name [] _ = [] |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
320 |
| append_name name (thm :: thms) k = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
321 |
Thm.name_thm ((name ^ "_" ^ string_of_int k), thm) :: append_name name thms (k + 1); |
15608 | 322 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
323 |
fun append_names (name :: names) (thms :: thmss) = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
324 |
append_name name thms 0 :: append_names names thmss; |
16357 | 325 |
|
15608 | 326 |
fun get_thms_ss [] = [] |
327 |
| get_thms_ss thms = |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
328 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
329 |
val names = map Thm.name_of_thm thms |
15608 | 330 |
val thms' = map (mksimps mksimps_pairs) thms |
331 |
val thms'' = append_names names thms' |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
332 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
333 |
ResLib.flat_noDup thms'' |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
334 |
end; |
15608 | 335 |
|
15452 | 336 |
|
15608 | 337 |
(* convert locally declared rules to axiom clauses *) |
338 |
(* write axiom clauses to ax_file *) |
|
15644 | 339 |
(* what about clasimpset - it should already be in the ax file - perhaps append to ax file rather than just *) |
340 |
(* write out ? Or keep as a separate file and then cat them all together in the watcher, like we do with the *) |
|
341 |
(*claset file and prob file*) |
|
16357 | 342 |
(* FIX*) |
16039
dfe264950511
Moved some of the clausify functions from ATP/res_clasimpset.ML to res_axioms.ML.
quigley
parents:
15919
diff
changeset
|
343 |
(*fun isar_local_thms (delta_cs, delta_ss_thms) = |
15608 | 344 |
let val thms_cs = get_thms_cs delta_cs |
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
345 |
val thms_ss = get_thms_ss delta_ss_thms |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
346 |
val thms_clauses = ResLib.flat_noDup (map ResAxioms.clausify_axiom (thms_cs @ thms_ss)) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
347 |
val clauses_strs = ResLib.flat_noDup (map ResClause.tptp_clause thms_clauses) (*string list*) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
348 |
val ax_file = File.platform_path axiom_file |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
349 |
val out = TextIO.openOut ax_file |
15608 | 350 |
in |
16897 | 351 |
(ResLib.writeln_strs out clauses_strs; (warning ("axiom file is "^ax_file));TextIO.closeOut out) |
15608 | 352 |
end; |
16039
dfe264950511
Moved some of the clausify functions from ATP/res_clasimpset.ML to res_axioms.ML.
quigley
parents:
15919
diff
changeset
|
353 |
*) |
15608 | 354 |
|
355 |
||
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
356 |
fun subtract_simpset thy ctxt = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
357 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
358 |
val rules1 = #rules (#1 (rep_ss (simpset_of thy))); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
359 |
val rules2 = #rules (#1 (rep_ss (local_simpset_of ctxt))); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
360 |
in map #thm (Net.subtract MetaSimplifier.eq_rrule rules1 rules2) end; |
15679
28eb0fe50533
Integrating the reconstruction files into the building of HOL
quigley
parents:
15657
diff
changeset
|
361 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
362 |
fun subtract_claset thy ctxt = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
363 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
364 |
val (netI1, netE1) = #xtra_netpair (rep_cs (claset_of thy)); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
365 |
val (netI2, netE2) = #xtra_netpair (rep_cs (local_claset_of ctxt)); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
366 |
val subtract = map (#2 o #2) oo Net.subtract Tactic.eq_kbrl; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
367 |
in subtract netI1 netI2 @ subtract netE1 netE2 end; |
15608 | 368 |
|
369 |
||
16357 | 370 |
|
16802
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
371 |
(** the Isar toplevel hook **) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
372 |
|
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
373 |
val _ = Toplevel.print_state_hook (fn _ => fn state => |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
374 |
let |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
375 |
val _ = if ! call_atp then () else raise Toplevel.UNDEF; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
376 |
val prf = |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
377 |
(case Toplevel.node_of state of Toplevel.Proof prf => prf | _ => raise Toplevel.UNDEF); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
378 |
val _ = Proof.assert_backward (the (ProofHistory.previous prf)); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
379 |
val proof = Proof.assert_forward (ProofHistory.current prf); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
380 |
val (ctxt, (_, goal)) = Proof.get_goal proof; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
381 |
|
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
382 |
val thy = ProofContext.theory_of ctxt; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
383 |
val prems_string = Meson.concat_with_and (map (Sign.string_of_term thy) (Thm.prems_of goal)); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
384 |
|
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
385 |
(* FIXME presently unused *) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
386 |
val ss_thms = subtract_simpset thy ctxt; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
387 |
val cs_thms = subtract_claset thy ctxt; |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
388 |
in |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
389 |
warning ("initial thm in isar_atp: " ^ string_of_thm goal); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
390 |
warning ("subgoals in isar_atp: " ^ prems_string); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
391 |
warning ("number of subgoals in isar_atp: " ^ string_of_int (Thm.nprems_of goal)); |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
392 |
(*isar_local_thms (d_cs,d_ss_thms);*) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
393 |
isar_atp' (ctxt, ProofContext.prems_of ctxt, goal) |
6eeee59dac4c
use Toplevel.print_state_hook instead of adhoc Proof.atp_hook;
wenzelm
parents:
16767
diff
changeset
|
394 |
end); |
16357 | 395 |
|
15347 | 396 |
end; |