\ / This software is distributed as is, NO WARRANTY.
V_______________________________________________________________ *)
+module P = Printf
+module L = Log
module B = Brg
type counters = {
let f c = count_term f c t in
count_term f c u
-let count_entry_binder f c = function
+let count_obj_binder f c = function
| B.Abst -> f {c with eabsts = succ c.eabsts}
| B.Abbr -> f {c with eabbrs = succ c.eabbrs}
-let count_entry f c (_, b, t) =
- let f c = count_entry_binder f c b in
+let count_obj f c (_, _, b, t) =
+ let f c = count_obj_binder f c b in
count_term f c t
let count_item f c = function
- | Some e -> count_entry f c e
- | None -> f c
+ | Some obj -> count_obj f c obj
+ | None -> f c
let print_counters f c =
let terms =
c.tabbrs
in
let items = c.eabsts + c.eabbrs in
- Printf.printf " Kernel representation summary (basic_rg)\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 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 " Explicit Cast items: %6u\n" c.tcasts;
- Printf.printf " Application items: %6u\n" c.tappls;
- Printf.printf " Abstraction items: %6u\n" c.tabsts;
- Printf.printf " Abbreviation items: %6u\n" c.tabbrs;
- flush stdout; f ()
+ L.warn (P.sprintf " Kernel representation summary (basic_rg)");
+ 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 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 " Explicit Cast items: %6u" c.tcasts);
+ L.warn (P.sprintf " Application items: %6u" c.tappls);
+ L.warn (P.sprintf " Abstraction items: %6u" c.tabsts);
+ L.warn (P.sprintf " Abbreviation items: %6u" c.tabbrs);
+ f ()