]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/toplevel/metaOutput.ml
log facility, initial environment for basic_rg
[helm.git] / helm / software / lambda-delta / toplevel / metaOutput.ml
index 04e15e4db58d664bade80518a177fdd3730e2c17..2d5bc3ad5c946ac3bbab196e9e0c6d92ac3d42cf 100644 (file)
@@ -9,8 +9,10 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
+module P = Printf
 module F = Format
 module U = NUri
+module L = Log
 module M = Meta
 
 type counters = {
@@ -71,20 +73,20 @@ let print_counters f c =
    let terms = c.tsorts + c.tgrefs + c.tgrefs + c.tappls + c.tabsts in
    let pars = c.pabsts + c.pappls in
    let items = c.eabsts + c.eabbrs in
-   Printf.printf "  Intermediate representation summary\n";
-   Printf.printf "    Total entry items:        %6u\n" items;
-   Printf.printf "      Declaration items:      %6u\n" c.eabsts;
-   Printf.printf "      Definition items:       %6u\n" c.eabbrs;
-   Printf.printf "    Total parameter items:    %6u\n" pars;
-   Printf.printf "      Application items:      %6u\n" c.pappls;
-   Printf.printf "      Abstraction items:      %6u\n" c.pabsts;
-   Printf.printf "    Total term items:         %6u\n" terms;
-   Printf.printf "      Sort items:             %6u\n" c.tsorts;
-   Printf.printf "      Local reference items:  %6u\n" c.tlrefs;
-   Printf.printf "      Global reference items: %6u\n" c.tgrefs;
-   Printf.printf "      Application items:      %6u\n" c.tappls;
-   Printf.printf "      Abstraction items:      %6u\n" c.tabsts;
-   flush stdout; f ()
+   L.warn (P.sprintf "  Intermediate representation summary");
+   L.warn (P.sprintf "    Total entry items:        %6u" items);
+   L.warn (P.sprintf "      Declaration items:      %6u" c.eabsts);
+   L.warn (P.sprintf "      Definition items:       %6u" c.eabbrs);
+   L.warn (P.sprintf "    Total parameter items:    %6u" pars);
+   L.warn (P.sprintf "      Application items:      %6u" c.pappls);
+   L.warn (P.sprintf "      Abstraction items:      %6u" c.pabsts);
+   L.warn (P.sprintf "    Total term items:         %6u" terms);
+   L.warn (P.sprintf "      Sort items:             %6u" c.tsorts);
+   L.warn (P.sprintf "      Local reference items:  %6u" c.tlrefs);
+   L.warn (P.sprintf "      Global reference items: %6u" c.tgrefs);
+   L.warn (P.sprintf "      Application items:      %6u" c.tappls);
+   L.warn (P.sprintf "      Abstraction items:      %6u" c.tabsts);
+   f ()
 
 let string_of_sort = function
    | true -> "Type"