X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Flambda-delta%2Fsrc%2Fcommon%2Fhierarchy.ml;h=28d95cc82cba6f14904971999362969a98df0aad;hb=39b42ed90bc74c8b6293842f1ac4aca60fc0c37e;hp=b7d4283539c394e2d35ee5c65fbb977c03eb1317;hpb=bb2a0b22a2c38b59ca664b550f34e5e40e6f04c7;p=helm.git diff --git a/helm/software/lambda-delta/src/common/hierarchy.ml b/helm/software/lambda-delta/src/common/hierarchy.ml index b7d428353..28d95cc82 100644 --- a/helm/software/lambda-delta/src/common/hierarchy.ml +++ b/helm/software/lambda-delta/src/common/hierarchy.ml @@ -9,28 +9,28 @@ \ / This software is distributed as is, NO WARRANTY. V_______________________________________________________________ *) -module H = Hashtbl -module S = Scanf +module K = Hashtbl +module P = Scanf module C = Cps type graph = string * (int -> int) let sorts = 3 -let sort = H.create sorts +let sort = K.create sorts let default_graph = "Z1" (* Internal functions *******************************************************) let set_sort h s = - H.add sort h s; succ h + K.add sort h s; succ h let graph_of_string err f s = try - let x = S.sscanf s "Z%u" C.start in + let x = P.sscanf s "Z%u" C.start in if x > 0 then f (s, fun h -> x + h) else err () with - S.Scan_failure _ | Failure _ | End_of_file -> err () + P.Scan_failure _ | Failure _ | End_of_file -> err () let graph = ref (graph_of_string C.err C.start default_graph) @@ -40,14 +40,14 @@ let set_sorts i ss = List.fold_left set_sort i ss let string_of_sort err f h = - try f (H.find sort h) with Not_found -> err () + try f (K.find sort h) with Not_found -> err () let sort_of_string err f s = let map h n = function | None when n = s -> Some h | xh -> xh in - match H.fold map sort None with + match K.fold map sort None with | None -> err () | Some h -> f h @@ -61,4 +61,4 @@ let set_graph s = graph_of_string err f s let clear () = - H.clear sort; graph := graph_of_string C.err C.start default_graph + K.clear sort; graph := graph_of_string C.err C.start default_graph