X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralHelpers.ml;h=7d95d86775de199f8e83ee7a1798bf6556b9ef4e;hb=04c05cf08605156ba8c6fa7225b4a90496c03698;hp=54b115aa254de92074659c52f97107a72a805bc1;hpb=2ea5357bace160aaf57750d9dcfb3077fe5a1b38;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralHelpers.ml b/helm/software/components/acic_procedural/proceduralHelpers.ml index 54b115aa2..7d95d8677 100644 --- a/helm/software/components/acic_procedural/proceduralHelpers.ml +++ b/helm/software/components/acic_procedural/proceduralHelpers.ml @@ -35,17 +35,6 @@ module D = Deannotate module PER = ProofEngineReduction module Ut = CicUtil -(* time stamping ************************************************************) - -let print_times = - let old = ref 0.0 in - fun msg -> - let times = Unix.times () in - let stamp = times.Unix.tms_utime +. times.Unix.tms_utime in - let lap = stamp -. !old in - Printf.eprintf "TIME STAMP: %s: %f\n" msg lap; flush stdout; - old := stamp - (* raw cic prettyprinter ****************************************************) let xiter out so ss sc map l = @@ -61,10 +50,10 @@ let abst s w = Some (s, C.Decl w) let abbr s v w = Some (s, C.Def (v, w)) let pp_sort out = function - | C.Type _ -> out "\Type" - | C.Prop -> out "\Prop" - | C.CProp _ -> out "\CProp" - | C.Set -> out "\Set" + | C.Type _ -> out "*Type" + | C.Prop -> out "*Prop" + | C.CProp _ -> out "*CProp" + | C.Set -> out "*Set" let pp_name out = function | C.Name s -> out s @@ -174,6 +163,19 @@ let mk_fresh_name context = function (* helper functions *********************************************************) +let rec list_fold_right_cps g map l a = + match l with + | [] -> g a + | hd :: tl -> + let h a = map g hd a in + list_fold_right_cps h map tl a + +let rec list_fold_left_cps g map a = function + | [] -> g a + | hd :: tl -> + let h a = list_fold_left_cps g map a tl in + map h a hd + let rec list_map_cps g map = function | [] -> g [] | hd :: tl ->