X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Flib%2Fhierarchy.ml;fp=helm%2Fsoftware%2Flambda-delta%2Flib%2Fhierarchy.ml;h=0000000000000000000000000000000000000000;hb=c8011c7ad75be5d03c4d4bb2e6900af32ad65c07;hp=f916e1e4316671761f0218d76f11b84ee40bd30f;hpb=3d3d0248bf4770c63361f7805d2099b2a607f44d;p=helm.git diff --git a/helm/software/lambda-delta/lib/hierarchy.ml b/helm/software/lambda-delta/lib/hierarchy.ml deleted file mode 100644 index f916e1e43..000000000 --- a/helm/software/lambda-delta/lib/hierarchy.ml +++ /dev/null @@ -1,49 +0,0 @@ -(* - ||M|| This file is part of HELM, an Hypertextual, Electronic - ||A|| Library of Mathematics, developed at the Computer Science - ||T|| Department, University of Bologna, Italy. - ||I|| - ||T|| HELM is free software; you can redistribute it and/or - ||A|| modify it under the terms of the GNU General Public License - \ / version 2 or (at your option) any later version. - \ / This software is distributed as is, NO WARRANTY. - V_______________________________________________________________ *) - -module H = Hashtbl -module S = Scanf -module C = Cps - -type graph = string * (int -> int) - -let sorts = 2 -let sort = H.create sorts -let index = ref 0 - -(* Internal functions *******************************************************) - -let set_sort f (h:int) (s:string) = - H.add sort h s; f (succ h) - -(* Interface functions ******************************************************) - -let set_new_sorts f ss = - let f i = index := i; f i in - C.list_fold_left f set_sort !index ss - -let get_sort f h = - try f (Some (H.find sort h)) - with Not_found -> f None - -let string_of_graph f (s, _) = f s - -let apply f (_, g) h = f (g h) - -let graph_of_string f s = - try - let x = S.sscanf s "Z%u" C.start in - if x > 0 then f (Some (s, fun h -> x + h)) else f None - with - S.Scan_failure _ | Failure _ | End_of_file -> f None - -let graph = - ref (graph_of_string (function Some g -> g | None -> assert false) "Z2")