X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fautomath%2FautOutput.ml;h=d692005bd27826f8d43026f277ca8ea26e0fe658;hb=34a5ef53f3ad2771cb45f90a2da6713bccdf3608;hp=ffbdfdb2096eeac175e3e86ee1af854c60fe100a;hpb=960ed22a5a6c415e2cf0ec9e8f5680d75c3ca0cd;p=helm.git diff --git a/helm/software/lambda-delta/automath/autOutput.ml b/helm/software/lambda-delta/automath/autOutput.ml index ffbdfdb20..d692005bd 100644 --- a/helm/software/lambda-delta/automath/autOutput.ml +++ b/helm/software/lambda-delta/automath/autOutput.ml @@ -10,8 +10,10 @@ V_______________________________________________________________ *) module P = Printf +module C = Cps module L = Log module A = Aut +module R = AutProcess type counters = { sections: int; @@ -39,7 +41,7 @@ let rec count_term f c = function let c = {c with grefs = succ c.grefs} in let c = {c with pars = c.pars + List.length ts} in let c = {c with xnodes = succ c.xnodes + List.length ts} in - Cps.list_fold_left f count_term c ts + C.list_fold_left f count_term c ts | A.Appl (v, t) -> let c = {c with appls = succ c.appls; xnodes = succ c.xnodes} in let f c = count_term f c t in @@ -49,7 +51,7 @@ let rec count_term f c = function let f c = count_term f c t in count_term f c w -let count_item f c = function +let count_command f c = function | A.Section _ -> f {c with sections = succ c.sections} | A.Context _ -> @@ -67,14 +69,14 @@ 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 + let entities = c.sections + c.contexts + c.blocks + c.decls + c.defs in L.warn (P.sprintf " Automath representation summary"); - L.warn (P.sprintf " Total book items: %7u" items); - L.warn (P.sprintf " Section items: %7u" c.sections); - L.warn (P.sprintf " Context items: %7u" c.contexts); - L.warn (P.sprintf " Block items: %7u" c.blocks); - L.warn (P.sprintf " Declaration items: %7u" c.decls); - L.warn (P.sprintf " Definition items: %7u" c.defs); + L.warn (P.sprintf " Total book entities: %7u" entities); + L.warn (P.sprintf " Section entities: %7u" c.sections); + L.warn (P.sprintf " Context entities: %7u" c.contexts); + L.warn (P.sprintf " Block entities: %7u" c.blocks); + L.warn (P.sprintf " Declaration entities: %7u" c.decls); + L.warn (P.sprintf " Definition entities: %7u" c.defs); L.warn (P.sprintf " Total Parameter items: %7u" c.pars); L.warn (P.sprintf " Application items: %7u" c.pars); L.warn (P.sprintf " Total term items: %7u" terms); @@ -85,3 +87,14 @@ let print_counters f c = L.warn (P.sprintf " Global Int. Complexity: unknown"); L.warn (P.sprintf " + Abbreviation nodes: %7u" c.xnodes); f () + +let print_process_counters f c = + let f iao iar iac iag = + L.warn (P.sprintf " Automath process summary"); + L.warn (P.sprintf " Implicit after opening: %7u" iao); + L.warn (P.sprintf " Implicit after reopening: %7u" iar); + L.warn (P.sprintf " Implicit after closing: %7u" iac); + L.warn (P.sprintf " Implicit after global: %7u" iag); + f () + in + R.get_counters f c