]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/helena/src/common/hierarchy.ml
last commit for helena 0.8.2
[helm.git] / helm / software / helena / src / common / hierarchy.ml
index 6e8c98fd66dc628ae4ab16cc13eb6008a98f7211..3484faba754313bcaa8bb3262101466f60c1c434 100644 (file)
@@ -9,29 +9,29 @@
      \ /   This software is distributed as is, NO WARRANTY.              
       V_______________________________________________________________ *)
 
-module K = Hashtbl
-module P = Scanf
+module KH = Hashtbl
+module KS = Scanf
 
-module C = Cps
+module C  = Cps
 
 type graph = string * (int -> int)
 
 let sorts = 3
-let sort = K.create sorts
+let sort = KH.create sorts
 
 let default_graph = "Z1"
 
 (* Internal functions *******************************************************)
 
 let set_sort h s =
-   K.add sort h s; succ h
+   KH.add sort h s; succ h
 
 let graph_of_string err f s =
    try 
-      let x = P.sscanf s "Z%u" C.start in 
+      let x = KS.sscanf s "Z%u" C.start in 
       if x > 0 then f (s, fun h -> x + h) else err ()
    with
-      P.Scan_failure _ | Failure _ | End_of_file -> err ()
+      KS.Scan_failure _ | Failure _ | End_of_file -> err ()
 
 let graph = ref (graph_of_string C.err C.start default_graph)
 
@@ -41,14 +41,14 @@ let set_sorts i ss =
    List.fold_left set_sort i ss
 
 let string_of_sort err f h =
-   try f (K.find sort h) with Not_found -> err ()
+   try f (KH.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 K.fold map sort None with
+   match KH.fold map sort None with
       | None   -> err ()
       | Some h -> f h
 
@@ -62,4 +62,4 @@ let set_graph s =
    graph_of_string err f s
 
 let clear () =
-   K.clear sort; graph := graph_of_string C.err C.start default_graph
+   KH.clear sort; graph := graph_of_string C.err C.start default_graph