X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fautomath%2FautOutput.ml;h=ffbdfdb2096eeac175e3e86ee1af854c60fe100a;hb=a872dba2b03e27967d5b9b51e950e85967340e52;hp=26a2d7b16976348eabbf25201a1cdc54c4d01961;hpb=13c3708fc59d999727ee214e8ece1f03661a9737;p=helm.git diff --git a/helm/software/lambda-delta/automath/autOutput.ml b/helm/software/lambda-delta/automath/autOutput.ml index 26a2d7b16..ffbdfdb20 100644 --- a/helm/software/lambda-delta/automath/autOutput.ml +++ b/helm/software/lambda-delta/automath/autOutput.ml @@ -23,27 +23,29 @@ type counters = { grefs: int; appls: int; absts: int; - pars: int + pars: int; + xnodes: int } let initial_counters = { sections = 0; contexts = 0; blocks = 0; decls = 0; defs = 0; - sorts = 0; grefs = 0; appls = 0; absts = 0; pars = 0 + sorts = 0; grefs = 0; appls = 0; absts = 0; pars = 0; xnodes = 0 } let rec count_term f c = function | A.Sort _ -> - f {c with sorts = succ c.sorts} + f {c with sorts = succ c.sorts; xnodes = succ c.xnodes} | A.GRef (_, ts) -> 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 | A.Appl (v, t) -> - let c = {c with appls = succ c.appls} in + let c = {c with appls = succ c.appls; xnodes = succ c.xnodes} in let f c = count_term f c t in count_term f c v | A.Abst (_, w, t) -> - let c = {c with absts = succ c.absts} in + let c = {c with absts = succ c.absts; xnodes = succ c.xnodes} in let f c = count_term f c t in count_term f c w @@ -53,13 +55,13 @@ let count_item f c = function | A.Context _ -> f {c with contexts = succ c.contexts} | A.Block (_, w) -> - let c = {c with blocks = succ c.blocks} in + let c = {c with blocks = succ c.blocks; xnodes = succ c.xnodes} in count_term f c w | A.Decl (_, w) -> - let c = {c with decls = succ c.decls} in + let c = {c with decls = succ c.decls; xnodes = succ c.xnodes} in count_term f c w | A.Def (_, w, _, t) -> - let c = {c with defs = succ c.defs} in + let c = {c with defs = succ c.defs; xnodes = succ c.xnodes} in let f c = count_term f c t in count_term f c w @@ -80,4 +82,6 @@ let print_counters f c = L.warn (P.sprintf " Reference items: %7u" c.grefs); L.warn (P.sprintf " Application items: %7u" c.appls); L.warn (P.sprintf " Abstraction items: %7u" c.absts); + L.warn (P.sprintf " Global Int. Complexity: unknown"); + L.warn (P.sprintf " + Abbreviation nodes: %7u" c.xnodes); f ()