]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/acic_procedural/acic2Procedural.ml
- we replaced a normalize with a whd in the classification algorithm
[helm.git] / helm / software / components / acic_procedural / acic2Procedural.ml
index ecd4abc744d79704f02a7cd201ba9fcdf295a58e..29b5677312874ccd2ebbf5e1f776261327aeb536 100644 (file)
@@ -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 =