X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fbasic_ag%2FbagOutput.ml;h=0bfc13ee64c3b4de9274a62f450cf583e9fc2369;hb=34a5ef53f3ad2771cb45f90a2da6713bccdf3608;hp=c315b1ec7a599052cfd877c7666d8cad09af8be0;hpb=de66af7241ad8ab71d5857d14570e4662f2488dc;p=helm.git diff --git a/helm/software/lambda-delta/basic_ag/bagOutput.ml b/helm/software/lambda-delta/basic_ag/bagOutput.ml index c315b1ec7..0bfc13ee6 100644 --- a/helm/software/lambda-delta/basic_ag/bagOutput.ml +++ b/helm/software/lambda-delta/basic_ag/bagOutput.ml @@ -13,8 +13,9 @@ module P = Printf module F = Format module U = NUri module L = Log +module O = Options +module Y = Entity module H = Hierarchy -module O = Output module B = Bag type counters = { @@ -62,21 +63,14 @@ and count_term f c = function let f c = count_term_binder f c b in count_term f c t -let count_obj_binder f c = function - | B.Abst w -> +let count_entity f c = function + | _, _, Y.Abst w -> let c = {c with eabsts = succ c.eabsts} in count_term f c w - | B.Abbr v -> + | _, _, Y.Abbr v -> let c = {c with eabbrs = succ c.eabbrs} in count_term f c v - | B.Void -> f c - -let count_obj f c (_, _, b) = - count_obj_binder f c b - -let count_item f c = function - | Some obj -> count_obj f c obj - | None -> f c + | _, _, Y.Void -> assert false let print_counters f c = let terms = @@ -107,7 +101,7 @@ let rec pp_term c frm = function | B.Sort h -> let err () = F.fprintf frm "@[*%u@]" h in let f s = F.fprintf frm "@[%s@]" s in - H.get_sort err f h + H.string_of_sort err f h | B.LRef i -> let f = function | Some (id, _) -> F.fprintf frm "@[%s@]" id @@ -133,7 +127,7 @@ let rec pp_term c frm = function let f cc = F.fprintf frm "@[[%s].%a@]" (res l id) (pp_term cc) t in B.push "output void" f c l id B.Void -let pp_context frm c = +let pp_lenv frm c = let pp_entry frm = function | l, id, B.Abst w -> F.fprintf frm "@,@[%s : %a@]" (res l id) (pp_term c) w @@ -147,5 +141,5 @@ let pp_context frm c = B.contents f c let specs = { - L.pp_term = pp_term; L.pp_context = pp_context + L.pp_term = pp_term; L.pp_lenv = pp_lenv }