X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=inline;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2Facic2Procedural.ml;h=29b5677312874ccd2ebbf5e1f776261327aeb536;hb=790eccfa6b94dc82826d919691f8d4bfadb04573;hp=ecd4abc744d79704f02a7cd201ba9fcdf295a58e;hpb=9ece6e414b255f519426d5643782af4f7dfc584f;p=helm.git diff --git a/helm/software/components/acic_procedural/acic2Procedural.ml b/helm/software/components/acic_procedural/acic2Procedural.ml index ecd4abc74..29b567731 100644 --- a/helm/software/components/acic_procedural/acic2Procedural.ml +++ b/helm/software/components/acic_procedural/acic2Procedural.ml @@ -58,6 +58,8 @@ type status = { skip_thm_and_qed : bool; } +let debug = true + (* helpers ******************************************************************) let split2_last l1 l2 = @@ -195,24 +197,32 @@ let mk_exp_args hd tl classes synth = let mk_convert st ?name sty ety note = let e = Cn.hole "" in let csty, cety = H.cic sty, H.cic ety in - let _note = Printf.sprintf "%s\nSINTH: %s\nEXP: %s" - note (Pp.ppterm csty) (Pp.ppterm cety) + let script = + if debug then + let sname = match name with None -> "" | Some (id, _) -> id in + let note = Printf.sprintf "%s: %s\nSINTH: %s\nEXP: %s" + note sname (Pp.ppterm csty) (Pp.ppterm cety) + in + [T.Note note] + else [] in assert (Ut.is_sober csty); assert (Ut.is_sober cety); - if Ut.alpha_equivalence csty cety then [(* T.Note note *)] else + if Ut.alpha_equivalence csty cety then script else let sty, ety = H.acic_bc st.context sty, H.acic_bc st.context ety in match name with - | None -> [T.Change (sty, ety, None, e, ""(*note*))] + | None -> T.Change (sty, ety, None, e, "") :: script | Some (id, i) -> begin match get_entry st id with - | C.Def _ -> assert false (* [T.ClearBody (id, note)] *) - | C.Decl _ -> [T.Change (ety, sty, Some (id, Some id), e, "" (* note *))] + | C.Def _ -> assert false (* T.ClearBody (id, "") :: script *) + | C.Decl _ -> + T.Change (ety, sty, Some (id, Some id), e, "") :: script end let convert st ?name v = match get_inner_types st v with - | None -> [(*T.Note "NORMAL: NO INNER TYPES"*)] + | None -> + if debug then [T.Note "NORMAL: NO INNER TYPES"] else [] | Some (sty, ety) -> mk_convert st ?name sty ety "NORMAL" let convert_elim st ?name t v pattern =