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