X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2FbrgOutput.ml;fp=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fbasic_rg%2FbrgOutput.ml;h=ed024a68e8faeb50c6901ce118e9cd1a6e3ce0a4;hb=22fd9c98a22929f0319286c0693fcdaee43a72df;hp=d4b851b76acdde44401ff8db9067260c6ed134a1;hpb=10d33a8c1be31d0c7aeccee8968fd5218ca2510a;p=helm.git diff --git a/helm/software/lambda-delta/src/basic_rg/brgOutput.ml b/helm/software/lambda-delta/src/basic_rg/brgOutput.ml index d4b851b76..ed024a68e 100644 --- a/helm/software/lambda-delta/src/basic_rg/brgOutput.ml +++ b/helm/software/lambda-delta/src/basic_rg/brgOutput.ml @@ -17,6 +17,7 @@ module L = Log module G = Options module E = Entity module H = Hierarchy +module N = Level module XD = XmlCrg module B = Brg module BD = BrgCrg @@ -48,13 +49,13 @@ let initial_counters = { } let rec count_term_binder f c e = function - | B.Abst w -> + | B.Abst (_, w) -> let c = {c with tabsts = succ c.tabsts; nodes = succ c.nodes} in count_term f c e w - | B.Abbr v -> + | B.Abbr v -> let c = {c with tabbrs = succ c.tabbrs; xnodes = succ c.xnodes} in count_term f c e v - | B.Void -> + | B.Void -> let c = {c with tvoids = succ c.tvoids; xnodes = succ c.xnodes} in f c @@ -89,15 +90,15 @@ and count_term f c e = function count_term_binder f c e b let count_entity f c = function - | _, u, E.Abst w -> + | _, u, E.Abst (_, w) -> let c = {c with eabsts = succ c.eabsts; nodes = succ c.nodes; uris = u :: c.uris } in count_term f c B.empty w - | _, _, E.Abbr v -> + | _, _, E.Abbr v -> let c = {c with eabbrs = succ c.eabbrs; xnodes = succ c.xnodes} in count_term f c B.empty v - | _, _, E.Void -> assert false + | _, _, E.Void -> assert false let print_counters f c = let terms = @@ -151,10 +152,13 @@ let rename f e a = let name err frm a = let f n = function | true -> F.fprintf frm "%s" n - | false -> F.fprintf frm "^%s" n + | false -> F.fprintf frm "-%s" n in E.name err f a +let pp_level frm n = + if N.is_infinite n then () else F.fprintf frm "^%s" (N.to_string n) + let rec pp_term e frm = function | B.Sort (_, h) -> let err _ = F.fprintf frm "@[*%u@]" h in @@ -171,10 +175,10 @@ let rec pp_term e frm = function F.fprintf frm "@[{%a}.%a@]" (pp_term e) u (pp_term e) t | B.Appl (_, v, t) -> F.fprintf frm "@[(%a).%a@]" (pp_term e) v (pp_term e) t - | B.Bind (a, B.Abst w, t) -> + | B.Bind (a, B.Abst (n, w), t) -> let f a = - let ee = B.push e B.empty a (B.abst w) in - F.fprintf frm "@[[%a:%a].%a@]" (name C.err) a (pp_term e) w (pp_term ee) t + let ee = B.push e B.empty a (B.abst n w) in + F.fprintf frm "@[[%a:%a]%a.%a@]" (name C.err) a (pp_term e) w pp_level n (pp_term ee) t in rename f e a | B.Bind (a, B.Abbr v, t) ->