author | quigley |
Wed, 22 Jun 2005 20:26:31 +0200 | |
changeset 16548 | aa36ae6b955e |
parent 16520 | 7a9cda53bfa2 |
child 16767 | 2d4433759b8d |
permissions | -rw-r--r-- |
15642 | 1 |
(* Title: SpassCommunication.ml |
15789
4cb16144c81b
added hearder lines and deleted some redundant material
paulson
parents:
15787
diff
changeset
|
2 |
ID: $Id$ |
15642 | 3 |
Author: Claire Quigley |
4 |
Copyright 2004 University of Cambridge |
|
5 |
*) |
|
6 |
||
7 |
(***************************************************************************) |
|
8 |
(* Code to deal with the transfer of proofs from a Spass process *) |
|
9 |
(***************************************************************************) |
|
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
10 |
signature SPASS_COMM = |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
11 |
sig |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
12 |
val reconstruct : bool ref |
16478 | 13 |
val spass: bool ref |
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
14 |
val getSpassInput : TextIO.instream -> string * string * string |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
15 |
val checkSpassProofFound: TextIO.instream * TextIO.outstream * Posix.Process.pid * string * |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
16 |
string *string * Thm.thm * int *(ResClause.clause * Thm.thm) Array.array * int -> bool |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
17 |
|
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
18 |
end; |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
19 |
|
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
20 |
structure SpassComm :SPASS_COMM = |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
21 |
struct |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
22 |
|
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
23 |
(* switch for whether to reconstruct a proof found, or just list the lemmas used *) |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
24 |
val reconstruct = ref true; |
16478 | 25 |
val spass = ref true; |
15642 | 26 |
|
27 |
(***********************************) |
|
28 |
(* Write Spass output to a file *) |
|
29 |
(***********************************) |
|
30 |
||
31 |
fun logSpassInput (instr, fd) = let val thisLine = TextIO.inputLine instr |
|
32 |
in if thisLine = "--------------------------SPASS-STOP------------------------------\n" |
|
33 |
then TextIO.output (fd, thisLine) |
|
34 |
else ( |
|
35 |
TextIO.output (fd, thisLine); logSpassInput (instr,fd)) |
|
36 |
end; |
|
37 |
||
38 |
(**********************************************************************) |
|
39 |
(* Reconstruct the Spass proof w.r.t. thmstring (string version of *) |
|
40 |
(* Isabelle goal to be proved), then transfer the reconstruction *) |
|
41 |
(* steps as a string to the input pipe of the main Isabelle process *) |
|
42 |
(**********************************************************************) |
|
43 |
||
44 |
||
16520 | 45 |
val atomize_tac = SUBGOAL |
15782 | 46 |
(fn (prop,_) => |
47 |
let val ts = Logic.strip_assums_hyp prop |
|
48 |
in EVERY1 |
|
49 |
[METAHYPS |
|
50 |
(fn hyps => (cut_facts_tac (map (ObjectLogic.atomize_thm o forall_intr_vars) hyps) 1)), |
|
51 |
REPEAT_DETERM_N (length ts) o (etac thin_rl)] |
|
52 |
end); |
|
15642 | 53 |
|
15782 | 54 |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
55 |
fun reconstruct_tac proofextract thmstring goalstring toParent ppid sg_num clause_arr (num_of_clauses:int ) = |
16259 | 56 |
let val foo = TextIO.openOut( File.platform_path(File.tmp_path (Path.basic"foobar3"))); |
15782 | 57 |
in |
58 |
SELECT_GOAL |
|
59 |
(EVERY1 [rtac ccontr,atomize_tac, skolemize_tac, |
|
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
60 |
METAHYPS(fn negs => (if !reconstruct |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
61 |
then |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
62 |
Recon_Transfer.spassString_to_reconString proofextract thmstring goalstring |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
63 |
toParent ppid negs clause_arr num_of_clauses |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
64 |
else |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
65 |
Recon_Transfer.spassString_to_lemmaString proofextract thmstring goalstring |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
66 |
toParent ppid negs clause_arr num_of_clauses ))]) sg_num |
15782 | 67 |
end ; |
68 |
||
69 |
||
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
70 |
fun transferSpassInput (fromChild, toParent, ppid,thmstring,goalstring, currentString, thm, sg_num,clause_arr, num_of_clauses) = let |
15642 | 71 |
val thisLine = TextIO.inputLine fromChild |
72 |
in |
|
73 |
if (thisLine = "--------------------------SPASS-STOP------------------------------\n" ) |
|
74 |
then ( |
|
15684
5ec4d21889d6
Reconstruction code, now packaged to avoid name clashes
paulson
parents:
15658
diff
changeset
|
75 |
let val proofextract = Recon_Parse.extract_proof (currentString^thisLine) |
16259 | 76 |
val foo = TextIO.openOut( File.platform_path(File.tmp_path (Path.basic"foobar2"))); |
15782 | 77 |
|
78 |
in |
|
79 |
||
80 |
TextIO.output(foo,(proofextract));TextIO.closeOut foo; |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
81 |
reconstruct_tac proofextract thmstring goalstring toParent ppid sg_num clause_arr num_of_clauses thm |
15782 | 82 |
|
83 |
end |
|
84 |
) |
|
85 |
else ( |
|
86 |
||
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
87 |
transferSpassInput (fromChild, toParent, ppid,thmstring, goalstring,(currentString^thisLine), thm, sg_num, clause_arr, num_of_clauses) |
15782 | 88 |
) |
89 |
end; |
|
90 |
||
91 |
||
92 |
||
15642 | 93 |
|
94 |
(*********************************************************************************) |
|
95 |
(* Inspect the output of a Spass process to see if it has found a proof, *) |
|
96 |
(* and if so, transfer output to the input pipe of the main Isabelle process *) |
|
97 |
(*********************************************************************************) |
|
98 |
||
99 |
||
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
100 |
fun startSpassTransfer (fromChild, toParent, ppid, thmstring,goalstring,childCmd,thm, sg_num,clause_arr, num_of_clauses) = |
15642 | 101 |
(*let val _ = Posix.Process.wait () |
102 |
in*) |
|
15782 | 103 |
|
15642 | 104 |
if (isSome (TextIO.canInput(fromChild, 5))) |
105 |
then |
|
106 |
( |
|
107 |
let val thisLine = TextIO.inputLine fromChild |
|
108 |
in |
|
109 |
if (String.isPrefix "Here is a proof" thisLine ) |
|
110 |
then |
|
111 |
( |
|
15782 | 112 |
let |
16259 | 113 |
val outfile = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "foo_transfer"))); |
15782 | 114 |
val _= TextIO.output (outfile, "about to transfer proof, thm is: "^(string_of_thm thm)); |
115 |
val _ = TextIO.closeOut outfile; |
|
116 |
in |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
117 |
transferSpassInput (fromChild, toParent, ppid,thmstring, goalstring,thisLine, thm, sg_num,clause_arr, num_of_clauses); |
15782 | 118 |
true |
119 |
end) |
|
15642 | 120 |
|
121 |
else |
|
122 |
( |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
123 |
startSpassTransfer (fromChild, toParent, ppid, thmstring, goalstring,childCmd, thm, sg_num,clause_arr, num_of_clauses) |
15642 | 124 |
) |
125 |
end |
|
126 |
) |
|
127 |
else (false) |
|
128 |
(* end*) |
|
129 |
||
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
130 |
|
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
131 |
|
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
132 |
fun checkSpassProofFound (fromChild, toParent, ppid,thmstring,goalstring, childCmd, thm, sg_num, clause_arr, (num_of_clauses:int )) = |
16259 | 133 |
let val spass_proof_file = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "spass_proof"))) |
134 |
val outfile = TextIO.openOut(File.platform_path(File.tmp_path (Path.basic "foo_checkspass"))); |
|
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
135 |
val _ = TextIO.output (outfile, "checking if proof found, thm is: "^(string_of_thm thm)) |
15642 | 136 |
|
137 |
val _ = TextIO.closeOut outfile |
|
138 |
in |
|
139 |
if (isSome (TextIO.canInput(fromChild, 5))) |
|
140 |
then |
|
141 |
( |
|
142 |
let val thisLine = TextIO.inputLine fromChild |
|
143 |
in if ( thisLine = "SPASS beiseite: Proof found.\n" ) |
|
144 |
then |
|
145 |
( |
|
16548
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
146 |
let val outfile = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "foo_proof"))); (*val _ = Posix.Process.sleep(Time.fromSeconds 3 );*) |
15642 | 147 |
val _ = TextIO.output (outfile, (thisLine)) |
148 |
||
149 |
val _ = TextIO.closeOut outfile |
|
150 |
in |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
151 |
startSpassTransfer (fromChild, toParent, ppid, thmstring,goalstring,childCmd, thm, sg_num, clause_arr, num_of_clauses) |
15642 | 152 |
end |
153 |
) |
|
154 |
else if (thisLine= "SPASS beiseite: Completion found.\n" ) |
|
155 |
then |
|
156 |
||
157 |
( |
|
16548
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
158 |
let val outfile = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "foo_proof"))); (* val _ = Posix.Process.sleep(Time.fromSeconds 3 );*) |
15642 | 159 |
val _ = TextIO.output (outfile, (thisLine)) |
160 |
||
161 |
val _ = TextIO.closeOut outfile |
|
162 |
in |
|
163 |
||
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
164 |
TextIO.output (toParent,childCmd^"\n" ); |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
165 |
TextIO.flushOut toParent; |
15642 | 166 |
TextIO.output (spass_proof_file, (thisLine)); |
167 |
TextIO.flushOut spass_proof_file; |
|
168 |
TextIO.closeOut spass_proof_file; |
|
169 |
(*TextIO.output (toParent, thisLine); |
|
170 |
TextIO.flushOut toParent; |
|
171 |
TextIO.output (toParent, "bar\n"); |
|
172 |
TextIO.flushOut toParent;*) |
|
173 |
||
174 |
TextIO.output (toParent, thisLine^"\n"); |
|
175 |
TextIO.flushOut toParent; |
|
176 |
TextIO.output (toParent, thmstring^"\n"); |
|
177 |
TextIO.flushOut toParent; |
|
178 |
TextIO.output (toParent, goalstring^"\n"); |
|
179 |
TextIO.flushOut toParent; |
|
180 |
Posix.Process.kill(Posix.Process.K_PROC ppid, Posix.Signal.usr2); |
|
181 |
(* Attempt to prevent several signals from turning up simultaneously *) |
|
15787 | 182 |
Posix.Process.sleep(Time.fromSeconds 1); |
15642 | 183 |
true |
184 |
end) |
|
185 |
else if ( thisLine = "SPASS beiseite: Ran out of time.\n" ) |
|
186 |
then |
|
16548
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
187 |
( let val outfile = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "foo_proof"))); (*val _ = Posix.Process.sleep(Time.fromSeconds 3 );*) |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
188 |
val _ = TextIO.output (outfile, (thisLine)) |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
189 |
|
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
190 |
|
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
191 |
in TextIO.output (toParent, thisLine^"\n"); |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
192 |
TextIO.flushOut toParent; |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
193 |
TextIO.output (toParent, thmstring^"\n"); |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
194 |
TextIO.flushOut toParent; |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
195 |
TextIO.output (toParent, goalstring^"\n"); |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
196 |
TextIO.flushOut toParent; |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
197 |
Posix.Process.kill(Posix.Process.K_PROC ppid, Posix.Signal.usr2); |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
198 |
TextIO.output (outfile, ("signalled parent\n"));TextIO.closeOut outfile; |
15642 | 199 |
|
16548
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
200 |
(* Attempt to prevent several signals from turning up simultaneously *) |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
201 |
Posix.Process.sleep(Time.fromSeconds 1); |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
202 |
true |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
203 |
end) |
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
204 |
|
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
205 |
|
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
206 |
|
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
207 |
else if ( thisLine = "SPASS beiseite: Maximal number of loops exceeded.\n" ) then |
15642 | 208 |
( |
209 |
Posix.Process.kill(Posix.Process.K_PROC ppid, Posix.Signal.usr2); |
|
210 |
TextIO.output (toParent,childCmd^"\n" ); |
|
211 |
TextIO.flushOut toParent; |
|
212 |
TextIO.output (toParent, thisLine); |
|
213 |
TextIO.flushOut toParent; |
|
214 |
||
215 |
true) |
|
216 |
else |
|
217 |
(TextIO.output (spass_proof_file, (thisLine)); |
|
218 |
TextIO.flushOut spass_proof_file; |
|
15919
b30a35432f5a
Replaced reference to SPASS with general one - set SPASS_HOME in settings file.
quigley
parents:
15789
diff
changeset
|
219 |
checkSpassProofFound (fromChild, toParent, ppid, thmstring,goalstring,childCmd, thm, sg_num, clause_arr, num_of_clauses)) |
15642 | 220 |
|
221 |
end |
|
222 |
) |
|
223 |
else |
|
224 |
(TextIO.output (spass_proof_file, ("No proof output seen \n"));TextIO.closeOut spass_proof_file;false) |
|
225 |
end |
|
226 |
||
227 |
||
228 |
(***********************************************************************) |
|
229 |
(* Function used by the Isabelle process to read in a spass proof *) |
|
230 |
(***********************************************************************) |
|
231 |
||
232 |
||
233 |
||
234 |
fun getSpassInput instr = if (isSome (TextIO.canInput(instr, 2))) |
|
235 |
then |
|
236 |
let val thisLine = TextIO.inputLine instr |
|
16357 | 237 |
val outfile = TextIO.openAppend(File.platform_path(File.tmp_path (Path.basic "foo_thisLine"))); val _ = TextIO.output (outfile, (thisLine)) |
238 |
||
15642 | 239 |
|
240 |
val _ = TextIO.closeOut outfile |
|
241 |
in |
|
242 |
if ( (substring (thisLine, 0,1))= "[") |
|
243 |
then |
|
244 |
(*Pretty.writeln(Pretty.str (thisLine))*) |
|
245 |
let val reconstr = thisLine |
|
246 |
val thmstring = TextIO.inputLine instr |
|
247 |
val goalstring = TextIO.inputLine instr |
|
248 |
in |
|
249 |
(reconstr, thmstring, goalstring) |
|
250 |
end |
|
16548
aa36ae6b955e
Temporarily removed Rewrite from the translation code so that parsing with work on lists of numbers.
quigley
parents:
16520
diff
changeset
|
251 |
else if (String.isPrefix "SPASS beiseite:" thisLine ) |
15642 | 252 |
then |
253 |
( |
|
254 |
let val reconstr = thisLine |
|
255 |
val thmstring = TextIO.inputLine instr |
|
256 |
val goalstring = TextIO.inputLine instr |
|
257 |
in |
|
258 |
(reconstr, thmstring, goalstring) |
|
259 |
end |
|
260 |
) |
|
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
261 |
|
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
262 |
else if (String.isPrefix "Rules from" thisLine) |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
263 |
then |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
264 |
( |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
265 |
let val reconstr = thisLine |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
266 |
val thmstring = TextIO.inputLine instr |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
267 |
val goalstring = TextIO.inputLine instr |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
268 |
in |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
269 |
(reconstr, thmstring, goalstring) |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
270 |
end |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
271 |
) |
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
272 |
|
16357 | 273 |
else if ((substring (thisLine, 0,5)) = "Proof") |
15642 | 274 |
then |
275 |
( |
|
276 |
let val reconstr = thisLine |
|
277 |
val thmstring = TextIO.inputLine instr |
|
278 |
val goalstring = TextIO.inputLine instr |
|
16259 | 279 |
val outfile = TextIO.openOut(File.platform_path(File.tmp_path (Path.basic "foo_getSpass"))); |
15642 | 280 |
val _ = TextIO.output (outfile, (thisLine)) |
281 |
val _ = TextIO.closeOut outfile |
|
282 |
in |
|
283 |
(reconstr, thmstring, goalstring) |
|
284 |
end |
|
285 |
) |
|
286 |
else |
|
287 |
getSpassInput instr |
|
288 |
||
289 |
end |
|
290 |
else |
|
15782 | 291 |
("No output from reconstruction process.\n","","") |
15642 | 292 |
|
293 |
||
16156
2f6fc19aba1e
Fixed array containing clasimpset rules. Added flags to turn on and off reconstruction and full spass
quigley
parents:
15919
diff
changeset
|
294 |
end; |