X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Ftoplevel%2FmetaOutput.ml;h=03995e15382dc741e02b6a2f1d79c8afeb569a21;hb=75620ca64e3038fcbebb51559fdc31b2e8a00f93;hp=a12818ee358b8b2234a89273cc0294a13545b5c3;hpb=f870943aedc6ef6f51be134ed3e82bbc03b3eea1;p=helm.git diff --git a/helm/software/lambda-delta/toplevel/metaOutput.ml b/helm/software/lambda-delta/toplevel/metaOutput.ml index a12818ee3..03995e153 100644 --- a/helm/software/lambda-delta/toplevel/metaOutput.ml +++ b/helm/software/lambda-delta/toplevel/metaOutput.ml @@ -1,30 +1,18 @@ -(* 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 F = Format module U = NUri +module L = Log module M = Meta type counters = { @@ -85,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" @@ -116,6 +104,9 @@ let pp_list pp opend sep closed frm l = in if l = [] then () else F.fprintf frm "%s%a%s" opend aux l closed +let pp_rev_list pp opend sep closed frm l = + pp_list pp opend sep closed frm (List.rev l) + let rec pp_args frm args = pp_list pp_term "(" "," ")" frm args and pp_term frm = function @@ -133,7 +124,7 @@ and pp_term frm = function let pp_par frm (id, w) = F.fprintf frm "%s:%a" id pp_term w -let pp_pars = pp_list pp_par "[" "," "]" +let pp_pars = pp_rev_list pp_par "[" "," "]" let pp_body frm = function | None -> ()