| C.Anonymous -> None
| C.Name s -> Some s
-let mk_intros st script =
+let mk_intros st what script =
let intros st script =
if st.intros = [] then script else
let count = List.length st.intros in
T.Intros (Some count, List.rev st.intros, "") :: script
in
let clears st script =
- if st.clears = [] then script else T.Clear (st.clears, st.clears_note) :: script
+ if true (* st.clears = [] *) then script else T.Clear (st.clears, st.clears_note) :: script
in
- intros st (clears st script)
+ intros st (clears st (convert st what @ script))
let mk_arg st = function
| C.ARel (_, _, i, name) as what -> convert st ~name:(name, i) what
else
[T.Apply (what, dtext)]
in
- mk_intros st script
+ mk_intros st what script
and proc_rel st what =
let _, dtext = test_depth st in
let text = "assumption" in
let script = [T.Apply (what, dtext ^ text)] in
- mk_intros st script
+ mk_intros st what script
and proc_mutconstruct st what =
let _, dtext = test_depth st in
let script = [T.Apply (what, dtext)] in
- mk_intros st script
+ mk_intros st what script
and proc_appl st what hd tl =
let proceed, dtext = test_depth st in
in
let synth = mk_synth I.S.empty decurry in
let text = "" (* Printf.sprintf "%u %s" parsno (Cl.to_string h) *) in
- let script = List.rev (mk_arg st hd) @ convert st what in
+ let script = List.rev (mk_arg st hd) in
match rc with
| Some (i, j, uri, tyno) ->
let classes, tl, _, where = split2_last classes tl in
else
[T.Apply (what, dtext)]
in
- mk_intros st script
+ mk_intros st what script
and proc_other st what =
let text = Printf.sprintf "%s: %s" "UNEXPANDED" (string_of_head what) in
let script = [T.Note text] in
- mk_intros st script
+ mk_intros st what script
and proc_proof st t =
let f st =
let optimize_obj = function
| C.Constant (name, Some bo, ty, pars, attrs) ->
let g bo =
- Printf.eprintf "Optimized: %s\nNodes : %u"
+ Printf.eprintf "Optimized : %s\nPost Nodes: %u\n"
(Pp.ppterm bo) (I.count_nodes 0 bo);
let _ = H.get_type [] (C.Cast (bo, ty)) in
C.Constant (name, Some bo, ty, pars, attrs)
in
- Printf.eprintf "BEGIN: %s\n" name;
+ Printf.eprintf "BEGIN: %s\nPre Nodes : %u\n"
+ name (I.count_nodes 0 bo);
begin try opt1_term g (* (opt2_term g []) *) true [] bo
with e -> failwith ("PPP: " ^ Printexc.to_string e) end
| obj -> obj