author  berghofe 
Thu, 28 Mar 1996 17:27:54 +0100  
changeset 1628  60136fdd80c4 
parent 1580  e3fd931e6095 
child 1928  3d1d73e3d185 
permissions  rwrr 
1460  1 
(* Title: Pure/goals.ML 
0  2 
ID: $Id$ 
1460  3 
Author: Lawrence C Paulson, Cambridge University Computer Laboratory 
0  4 
Copyright 1993 University of Cambridge 
5 

6 
Goal stack package. The goal stack initially holds a dummy proof, and can 

7 
never become empty. Each goal stack consists of a list of levels. The 

8 
undo list is a list of goal stacks. Finally, there may be a stack of 

9 
pending proofs. 

10 
*) 

11 

12 

13 
signature GOALS = 

14 
sig 

15 
type proof 

1460  16 
val ba : int > unit 
17 
val back : unit > unit 

18 
val bd : thm > int > unit 

19 
val bds : thm list > int > unit 

20 
val be : thm > int > unit 

21 
val bes : thm list > int > unit 

22 
val br : thm > int > unit 

23 
val brs : thm list > int > unit 

24 
val bw : thm > unit 

25 
val bws : thm list > unit 

26 
val by : tactic > unit 

27 
val byev : tactic list > unit 

28 
val chop : unit > unit 

29 
val choplev : int > unit 

30 
val fa : unit > unit 

31 
val fd : thm > unit 

32 
val fds : thm list > unit 

33 
val fe : thm > unit 

34 
val fes : thm list > unit 

35 
val filter_goal : (term*term>bool) > thm list > int > thm list 

36 
val fr : thm > unit 

37 
val frs : thm list > unit 

38 
val getgoal : int > term 

39 
val gethyps : int > thm list 

40 
val goal : theory > string > thm list 

41 
val goalw : theory > thm list > string > thm list 

42 
val goalw_cterm : thm list > cterm > thm list 

43 
val pop_proof : unit > thm list 

44 
val pr : unit > unit 

1628
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

45 
val pr_latex : unit > unit 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

46 
val printgoal_latex : int > unit 
1460  47 
val premises : unit > thm list 
48 
val prin : term > unit 

49 
val printyp : typ > unit 

50 
val pprint_term : term > pprint_args > unit 

51 
val pprint_typ : typ > pprint_args > unit 

52 
val print_exn : exn > 'a 

53 
val print_sign_exn : Sign.sg > exn > 'a 

54 
val prlev : int > unit 

55 
val proof_timing : bool ref 

56 
val prove_goal : theory > string > (thm list > tactic list) > thm 

577  57 
val prove_goalw : theory>thm list>string>(thm list>tactic list)>thm 
1460  58 
val prove_goalw_cterm : thm list>cterm>(thm list>tactic list)>thm 
59 
val push_proof : unit > unit 

60 
val read : string > term 

61 
val ren : string > int > unit 

62 
val restore_proof : proof > thm list 

63 
val result : unit > thm 

64 
val rotate_proof : unit > thm list 

65 
val uresult : unit > thm 

66 
val save_proof : unit > proof 

67 
val topthm : unit > thm 

68 
val undo : unit > unit 

0  69 
end; 
70 

1500  71 
structure Goals : GOALS = 
0  72 
struct 
73 

74 
(*Each level of goal stack includes a proof state and alternative states, 

75 
the output of the tactic applied to the preceeding level. *) 

76 
type gstack = (thm * thm Sequence.seq) list; 

77 

78 
datatype proof = Proof of gstack list * thm list * (bool*thm>thm); 

79 

80 
(*** References ***) 

81 

82 
(*Should process time be printed after proof steps?*) 

83 
val proof_timing = ref false; 

84 

85 
(*Current assumption list  set by "goal".*) 

86 
val curr_prems = ref([] : thm list); 

87 

88 
(*Return assumption list  useful if you didn't save "goal"'s result. *) 

89 
fun premises() = !curr_prems; 

90 

91 
(*Current result maker  set by "goal", used by "result". *) 

92 
val curr_mkresult = 

93 
ref((fn _=> error"No goal has been supplied in subgoal module") 

94 
: bool*thm>thm); 

95 

922
196ca0973a6d
added CPure (curried functions) and ProtoPure (ancestor of Pure and CPure)
clasohm
parents:
914
diff
changeset

96 
val dummy = trivial(read_cterm Sign.proto_pure 
0  97 
("PROP No_goal_has_been_supplied",propT)); 
98 

99 
(*List of previous goal stacks, for the undo operation. Set by setstate. 

100 
A list of lists!*) 

101 
val undo_list = ref([[(dummy, Sequence.null)]] : gstack list); 

102 

103 
(* Stack of proof attempts *) 

104 
val proofstack = ref([]: proof list); 

105 

106 

107 
(*** Setting up goaldirected proof ***) 

108 

109 
(*Generates the list of new theories when the proof state's signature changes*) 

110 
fun sign_error (sign,sign') = 

111 
let val stamps = #stamps(Sign.rep_sg sign') \\ 

112 
#stamps(Sign.rep_sg sign) 

113 
in case stamps of 

114 
[stamp] => "\nNew theory: " ^ !stamp 

115 
 _ => "\nNew theories: " ^ space_implode ", " (map ! stamps) 

116 
end; 

117 

118 
(*Common treatment of "goal" and "prove_goal": 

119 
Return assumptions, initial proof state, and function to make result. *) 

120 
fun prepare_proof rths chorn = 

230  121 
let val {sign, t=horn,...} = rep_cterm chorn; 
0  122 
val (_,As,B) = Logic.strip_horn(horn); 
230  123 
val cAs = map (cterm_of sign) As; 
1413  124 
val prems = map (rewrite_rule rths o forall_elim_vars(0) o assume) cAs 
125 
and st0 = (rewrite_goals_rule rths o trivial) (cterm_of sign B) 

0  126 
fun result_error state msg = 
127 
(writeln ("Bad final proof state:"); 

1460  128 
!print_goals_ref (!goals_limit) state; 
129 
error msg) 

0  130 
(*discharges assumptions from state in the order they appear in goal; 
1460  131 
checks (if requested) that resulting theorem is equivalent to goal. *) 
0  132 
fun mkresult (check,state) = 
696
eb5b42442b14
Pure/goals/prepare_proof/mkresult: now smashes flexflex pairs in the final
lcp
parents:
678
diff
changeset

133 
let val state = Sequence.hd (flexflex_rule state) 
1565  134 
handle THM _ => state (*smash flexflex pairs*) 
1460  135 
val ngoals = nprems_of state 
1219  136 
val th = strip_shyps (implies_intr_list cAs state) 
1240  137 
val {hyps,prop,sign=sign',...} = rep_thm th 
138 
val xshyps = extra_shyps th; 

0  139 
in if not check then standard th 
1460  140 
else if not (Sign.eq_sg(sign,sign')) then result_error state 
141 
("Signature of proof state has changed!" ^ 

142 
sign_error (sign,sign')) 

0  143 
else if ngoals>0 then result_error state 
1460  144 
(string_of_int ngoals ^ " unsolved goals!") 
0  145 
else if not (null hyps) then result_error state 
146 
("Additional hypotheses:\n" ^ 

147 
cat_lines (map (Sign.string_of_term sign) hyps)) 

1460  148 
else if not (null xshyps) then result_error state 
1240  149 
("Extra sort hypotheses: " ^ 
1500  150 
commas (map Type.str_of_sort xshyps)) 
1460  151 
else if Pattern.matches (#tsig(Sign.rep_sg sign)) 
152 
(term_of chorn, prop) 

153 
then standard th 

154 
else result_error state "proved a different theorem" 

0  155 
end 
678
6151b7f3b606
Modified pattern.ML to perform proper matching of HigherOrder Patterns.
nipkow
parents:
577
diff
changeset

156 
in 
6151b7f3b606
Modified pattern.ML to perform proper matching of HigherOrder Patterns.
nipkow
parents:
577
diff
changeset

157 
if Sign.eq_sg(sign, #sign(rep_thm st0)) 
0  158 
then (prems, st0, mkresult) 
159 
else error ("Definitions would change the proof state's signature" ^ 

1460  160 
sign_error (sign, #sign(rep_thm st0))) 
0  161 
end 
162 
handle THM(s,_,_) => error("prepare_proof: exception THM was raised!\n" ^ s); 

163 

164 
(*Prints exceptions readably to users*) 

577  165 
fun print_sign_exn_unit sign e = 
0  166 
case e of 
167 
THM (msg,i,thms) => 

1460  168 
(writeln ("Exception THM " ^ string_of_int i ^ " raised:\n" ^ msg); 
169 
seq print_thm thms) 

0  170 
 THEORY (msg,thys) => 
1460  171 
(writeln ("Exception THEORY raised:\n" ^ msg); 
172 
seq print_theory thys) 

0  173 
 TERM (msg,ts) => 
1460  174 
(writeln ("Exception TERM raised:\n" ^ msg); 
175 
seq (writeln o Sign.string_of_term sign) ts) 

0  176 
 TYPE (msg,Ts,ts) => 
1460  177 
(writeln ("Exception TYPE raised:\n" ^ msg); 
178 
seq (writeln o Sign.string_of_typ sign) Ts; 

179 
seq (writeln o Sign.string_of_term sign) ts) 

0  180 
 e => raise e; 
181 

577  182 
(*Prints an exception, then fails*) 
183 
fun print_sign_exn sign e = (print_sign_exn_unit sign e; raise ERROR); 

184 

0  185 
(** the prove_goal.... commands 
186 
Prove theorem using the listed tactics; check it has the specified form. 

187 
Augment signature with all type assignments of goal. 

188 
Syntax is similar to "goal" command for easy keyboard use. **) 

189 

190 
(*Version taking the goal as a cterm*) 

191 
fun prove_goalw_cterm rths chorn tacsf = 

192 
let val (prems, st0, mkresult) = prepare_proof rths chorn 

193 
val tac = EVERY (tacsf prems) 

194 
fun statef() = 

1500  195 
(case Sequence.pull (tac st0) of 
1460  196 
Some(st,_) => st 
197 
 _ => error ("prove_goal: tactic failed")) 

545
fc4ff96bb0e9
Pure/goals.ML: prove_goalw_cterm now does its own exceptionhandling, moved
lcp
parents:
253
diff
changeset

198 
in mkresult (true, cond_timeit (!proof_timing) statef) end 
914
cae574c09137
Now prove_goalw_cterm calls print_sign_exn_unit, so that the rest
lcp
parents:
696
diff
changeset

199 
handle e => (print_sign_exn_unit (#sign (rep_cterm chorn)) e; 
1460  200 
error ("The exception above was raised for\n" ^ 
201 
string_of_cterm chorn)); 

545
fc4ff96bb0e9
Pure/goals.ML: prove_goalw_cterm now does its own exceptionhandling, moved
lcp
parents:
253
diff
changeset

202 

0  203 

204 
(*Version taking the goal as a string*) 

205 
fun prove_goalw thy rths agoal tacsf = 

206 
let val sign = sign_of thy 

230  207 
val chorn = read_cterm sign (agoal,propT) 
545
fc4ff96bb0e9
Pure/goals.ML: prove_goalw_cterm now does its own exceptionhandling, moved
lcp
parents:
253
diff
changeset

208 
in prove_goalw_cterm rths chorn tacsf end 
fc4ff96bb0e9
Pure/goals.ML: prove_goalw_cterm now does its own exceptionhandling, moved
lcp
parents:
253
diff
changeset

209 
handle ERROR => error (*from read_cterm?*) 
1460  210 
("The error above occurred for " ^ quote agoal); 
0  211 

212 
(*String version with no metarewriterules*) 

213 
fun prove_goal thy = prove_goalw thy []; 

214 

215 

216 
(*** Commands etc ***) 

217 

218 
(*Return the current goal stack, if any, from undo_list*) 

219 
fun getstate() : gstack = case !undo_list of 

220 
[] => error"No current state in subgoal module" 

221 
 x::_ => x; 

222 

223 
(*Pops the given goal stack*) 

224 
fun pop [] = error"Cannot go back past the beginning of the proof!" 

225 
 pop (pair::pairs) = (pair,pairs); 

226 

227 

228 
(*Print a level of the goal stack.*) 

229 
fun print_top ((th,_), pairs) = 

230 
(prs("Level " ^ string_of_int(length pairs) ^ "\n"); 

68
d8f380764934
goals/print_top,prepare_proof: now call \!print_goals_ref
lcp
parents:
39
diff
changeset

231 
!print_goals_ref (!goals_limit) th); 
0  232 

233 
(*Printing can raise exceptions, so the assignment occurs last. 

234 
Can do setstate[(st,Sequence.null)] to set st as the state. *) 

235 
fun setstate newgoals = 

236 
(print_top (pop newgoals); undo_list := newgoals :: !undo_list); 

237 

238 
(*Given a proof state transformation, return a command that updates 

239 
the goal stack*) 

240 
fun make_command com = setstate (com (pop (getstate()))); 

241 

242 
(*Apply a function on proof states to the current goal stack*) 

243 
fun apply_fun f = f (pop(getstate())); 

244 

245 
(*Return the top theorem, representing the proof state*) 

246 
fun topthm () = apply_fun (fn ((th,_), _) => th); 

247 

248 
(*Return the final result. *) 

249 
fun result () = !curr_mkresult (true, topthm()); 

250 

251 
(*Return the result UNCHECKED that it equals the goal  for synthesis, 

252 
answer extraction, or other instantiation of Vars *) 

253 
fun uresult () = !curr_mkresult (false, topthm()); 

254 

255 
(*Get subgoal i from goal stack*) 

256 
fun getgoal i = 

257 
(case drop (i1, prems_of (topthm())) of 

1460  258 
[] => error"getgoal: Goal number out of range" 
259 
 Q::_ => Q); 

0  260 

261 
(*Return subgoal i's hypotheses as metalevel assumptions. 

262 
For debugging uses of METAHYPS*) 

263 
local exception GETHYPS of thm list 

264 
in 

265 
fun gethyps i = 

1500  266 
(METAHYPS (fn hyps => raise (GETHYPS hyps)) i (topthm()); []) 
0  267 
handle GETHYPS hyps => hyps 
268 
end; 

269 

270 
(*Which thms could apply to goal i? (debugs tactics involving filter_thms) *) 

271 
fun filter_goal could ths i = filter_thms could (999, getgoal i, ths); 

272 

273 
(*For inspecting earlier levels of the backward proof*) 

274 
fun chop_level n (pair,pairs) = 

275 
let val level = length pairs 

276 
in if 0<=n andalso n<= level 

277 
then drop (level  n, pair::pairs) 

278 
else error ("Level number must lie between 0 and " ^ 

1460  279 
string_of_int level) 
0  280 
end; 
281 

282 
(*Print the given level of the proof*) 

283 
fun prlev n = apply_fun (print_top o pop o (chop_level n)); 

284 
fun pr () = apply_fun print_top; 

285 

286 
(** the goal.... commands 

287 
Read main goal. Set global variables curr_prems, curr_mkresult. 

288 
Initial subgoal and premises are rewritten using rths. **) 

289 

290 
(*Version taking the goal as a cterm; if you have a term t and theory thy, use 

230  291 
goalw_cterm rths (cterm_of (sign_of thy) t); *) 
0  292 
fun goalw_cterm rths chorn = 
293 
let val (prems, st0, mkresult) = prepare_proof rths chorn 

294 
in undo_list := []; 

295 
setstate [ (st0, Sequence.null) ]; 

296 
curr_prems := prems; 

297 
curr_mkresult := mkresult; 

298 
prems 

299 
end; 

300 

301 
(*Version taking the goal as a string*) 

302 
fun goalw thy rths agoal = 

230  303 
goalw_cterm rths (read_cterm(sign_of thy)(agoal,propT)) 
0  304 
handle ERROR => error (*from type_assign, etc via prepare_proof*) 
1460  305 
("The error above occurred for " ^ quote agoal); 
0  306 

307 
(*String version with no metarewriterules*) 

308 
fun goal thy = goalw thy []; 

309 

310 
(*Proof step "by" the given tactic  apply tactic to the proof state*) 

311 
fun by_com tac ((th,ths), pairs) : gstack = 

1500  312 
(case Sequence.pull(tac th) of 
0  313 
None => error"by: tactic failed" 
314 
 Some(th2,ths2) => 

315 
(if eq_thm(th,th2) 

1580
e3fd931e6095
Added some functions which allow redirection of Isabelle's output
berghofe
parents:
1565
diff
changeset

316 
then warning "same as previous level" 
1460  317 
else if eq_thm_sg(th,th2) then () 
1580
e3fd931e6095
Added some functions which allow redirection of Isabelle's output
berghofe
parents:
1565
diff
changeset

318 
else warning("signature of proof state has changed" ^ 
1460  319 
sign_error (#sign(rep_thm th), #sign(rep_thm th2))); 
0  320 
((th2,ths2)::(th,ths)::pairs))); 
321 

322 
fun by tac = cond_timeit (!proof_timing) 

323 
(fn() => make_command (by_com tac)); 

324 

325 
(* byev[tac1,...,tacn] applies tac1 THEN ... THEN tacn. 

326 
Good for debugging proofs involving prove_goal.*) 

327 
val byev = by o EVERY; 

328 

329 

330 
(*Backtracking means find an alternative result from a tactic. 

331 
If none at this level, try earlier levels*) 

332 
fun backtrack [] = error"back: no alternatives" 

333 
 backtrack ((th,thstr) :: pairs) = 

334 
(case Sequence.pull thstr of 

1460  335 
None => (writeln"Going back a level..."; backtrack pairs) 
336 
 Some(th2,thstr2) => 

337 
(if eq_thm(th,th2) 

1580
e3fd931e6095
Added some functions which allow redirection of Isabelle's output
berghofe
parents:
1565
diff
changeset

338 
then warning "same as previous choice at this level" 
1460  339 
else if eq_thm_sg(th,th2) then () 
1580
e3fd931e6095
Added some functions which allow redirection of Isabelle's output
berghofe
parents:
1565
diff
changeset

340 
else warning "signature of proof state has changed"; 
1460  341 
(th2,thstr2)::pairs)); 
0  342 

343 
fun back() = setstate (backtrack (getstate())); 

344 

345 
(*Chop back to previous level of the proof*) 

346 
fun choplev n = make_command (chop_level n); 

347 

348 
(*Chopping back the goal stack*) 

349 
fun chop () = make_command (fn (_,pairs) => pairs); 

350 

351 
(*Restore the previous proof state; discard current state. *) 

352 
fun undo() = case !undo_list of 

353 
[] => error"No proof state" 

354 
 [_] => error"Already at initial state" 

355 
 _::newundo => (undo_list := newundo; pr()) ; 

356 

357 

358 
(*** Managing the proof stack ***) 

359 

360 
fun save_proof() = Proof(!undo_list, !curr_prems, !curr_mkresult); 

361 

362 
fun restore_proof(Proof(ul,prems,mk)) = 

363 
(undo_list:= ul; curr_prems:= prems; curr_mkresult := mk; prems); 

364 

365 

366 
fun top_proof() = case !proofstack of 

1460  367 
[] => error("Stack of proof attempts is empty!") 
0  368 
 p::ps => (p,ps); 
369 

370 
(* push a copy of the current proof state on to the stack *) 

371 
fun push_proof() = (proofstack := (save_proof() :: !proofstack)); 

372 

373 
(* discard the top proof state of the stack *) 

374 
fun pop_proof() = 

375 
let val (p,ps) = top_proof() 

376 
val prems = restore_proof p 

377 
in proofstack := ps; pr(); prems end; 

378 

379 
(* rotate the stack so that the top element goes to the bottom *) 

380 
fun rotate_proof() = let val (p,ps) = top_proof() 

1460  381 
in proofstack := ps@[save_proof()]; 
382 
restore_proof p; 

383 
pr(); 

384 
!curr_prems 

385 
end; 

0  386 

387 

388 
(** Shortcuts for commonlyused tactics **) 

389 

390 
fun bws rls = by (rewrite_goals_tac rls); 

391 
fun bw rl = bws [rl]; 

392 

393 
fun brs rls i = by (resolve_tac rls i); 

394 
fun br rl = brs [rl]; 

395 

396 
fun bes rls i = by (eresolve_tac rls i); 

397 
fun be rl = bes [rl]; 

398 

399 
fun bds rls i = by (dresolve_tac rls i); 

400 
fun bd rl = bds [rl]; 

401 

402 
fun ba i = by (assume_tac i); 

403 

404 
fun ren str i = by (rename_tac str i); 

405 

406 
(** Shortcuts to work on the first applicable subgoal **) 

407 

408 
fun frs rls = by (FIRSTGOAL (trace_goalno_tac (resolve_tac rls))); 

409 
fun fr rl = frs [rl]; 

410 

411 
fun fes rls = by (FIRSTGOAL (trace_goalno_tac (eresolve_tac rls))); 

412 
fun fe rl = fes [rl]; 

413 

414 
fun fds rls = by (FIRSTGOAL (trace_goalno_tac (dresolve_tac rls))); 

415 
fun fd rl = fds [rl]; 

416 

417 
fun fa() = by (FIRSTGOAL (trace_goalno_tac assume_tac)); 

418 

419 
(** Reading and printing terms wrt the current theory **) 

420 

421 
fun top_sg() = #sign(rep_thm(topthm())); 

422 

230  423 
fun read s = term_of (read_cterm (top_sg()) 
1460  424 
(s, (TVar(("DUMMY",0),[])))); 
0  425 

426 
(*Print a term under the current signature of the proof state*) 

427 
fun prin t = writeln (Sign.string_of_term (top_sg()) t); 

428 

429 
fun printyp T = writeln (Sign.string_of_typ (top_sg()) T); 

430 

431 
fun pprint_term t = Sign.pprint_term (top_sg()) t; 

432 

433 
fun pprint_typ T = Sign.pprint_typ (top_sg()) T; 

434 

1628
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

435 
(* Redirect output of function f:unit>unit to LaTeX *) 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

436 
fun redirect_to_latex f = 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

437 
let 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

438 
val s = ref "" 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

439 
val old_prs_fn = !prs_fn 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

440 
in 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

441 
(prs_fn := (fn a => s := !s ^ a); 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

442 
f (); 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

443 
latex (!s); 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

444 
prs_fn := old_prs_fn) 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

445 
end; 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

446 

60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

447 
(* Display current proof state in xdvi window *) 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

448 
fun pr_latex () = redirect_to_latex pr; 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

449 

60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

450 
(* Display goal n of current proof state in xdvi window *) 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

451 
fun printgoal_latex n = redirect_to_latex (fn () => prin(getgoal n)); 
60136fdd80c4
Added functions pr_latex and printgoal_latex which
berghofe
parents:
1580
diff
changeset

452 

0  453 
(*Prints exceptions nicely at top level; 
454 
raises the exception in order to have a polymorphic type!*) 

914
cae574c09137
Now prove_goalw_cterm calls print_sign_exn_unit, so that the rest
lcp
parents:
696
diff
changeset

455 
fun print_exn e = (print_sign_exn_unit (top_sg()) e; raise e); 
0  456 

457 
end; 

1500  458 

459 
open Goals; 