]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/lambda-delta/automath/autOutput.ml
log facility, initial environment for basic_rg
[helm.git] / helm / software / lambda-delta / automath / autOutput.ml
index 4ccb74b5c3650531e906c6cfbe4b69d8d5373e8d..3bda05f9e3dec14d6ede09ff2c087d51ee26618b 100644 (file)
@@ -1,28 +1,16 @@
-(* Copyright (C) 2000, HELM Team.
- * 
- * This file is part of HELM, an Hypertextual, Electronic
- * Library of Mathematics, developed at the Computer Science
- * Department, University of Bologna, Italy.
- * 
- * HELM is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- * 
- * HELM is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HELM; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
- * MA  02111-1307, USA.
- * 
- * For details, see the HELM World-Wide-Web page,
- * http://cs.unibo.it/helm/.
- *)
+(*
+    ||M||  This file is part of HELM, an Hypertextual, Electronic        
+    ||A||  Library of Mathematics, developed at the Computer Science     
+    ||T||  Department, University of Bologna, Italy.                     
+    ||I||                                                                
+    ||T||  HELM is free software; you can redistribute it and/or         
+    ||A||  modify it under the terms of the GNU General Public License   
+    \   /  version 2 or (at your option) any later version.              
+     \ /   This software is distributed as is, NO WARRANTY.              
+      V_______________________________________________________________ *)
 
+module P = Printf
+module L = Log
 module A = Aut
 
 type counters = {
@@ -78,18 +66,18 @@ let count_item f c = function
 let print_counters f c =
    let terms = c.sorts + c.grefs + c.appls + c.absts in
    let items = c.sections + c.contexts + c.blocks + c.decls + c.defs in
-   Printf.printf "  Automath representation summary\n";
-   Printf.printf "    Total book items:         %6u\n" items;
-   Printf.printf "      Section items:          %6u\n" c.sections;
-   Printf.printf "      Context items:          %6u\n" c.contexts;
-   Printf.printf "      Block items:            %6u\n" c.blocks;
-   Printf.printf "      Declaration items:      %6u\n" c.decls;
-   Printf.printf "      Definition items:       %6u\n" c.defs;
-   Printf.printf "    Total Parameter items:    %6u\n" c.pars;
-   Printf.printf "      Application items:      %6u\n" c.pars;
-   Printf.printf "    Total term items:         %6u\n" terms;
-   Printf.printf "      Sort items:             %6u\n" c.sorts;
-   Printf.printf "      Reference items:        %6u\n" c.grefs;
-   Printf.printf "      Application items:      %6u\n" c.appls;
-   Printf.printf "      Abstraction items:      %6u\n" c.absts;
-   flush stdout; f ()
+   L.warn (P.sprintf "  Automath representation summary");
+   L.warn (P.sprintf "    Total book items:         %6u" items);
+   L.warn (P.sprintf "      Section items:          %6u" c.sections);
+   L.warn (P.sprintf "      Context items:          %6u" c.contexts);
+   L.warn (P.sprintf "      Block items:            %6u" c.blocks);
+   L.warn (P.sprintf "      Declaration items:      %6u" c.decls);
+   L.warn (P.sprintf "      Definition items:       %6u" c.defs);
+   L.warn (P.sprintf "    Total Parameter items:    %6u" c.pars);
+   L.warn (P.sprintf "      Application items:      %6u" c.pars);
+   L.warn (P.sprintf "    Total term items:         %6u" terms);
+   L.warn (P.sprintf "      Sort items:             %6u" c.sorts);
+   L.warn (P.sprintf "      Reference items:        %6u" c.grefs);
+   L.warn (P.sprintf "      Application items:      %6u" c.appls);
+   L.warn (P.sprintf "      Abstraction items:      %6u" c.absts);
+   f ()