]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/urimanager/uriManager.ml
relativeDepth function removed (useful only for cooking)
[helm.git] / helm / ocaml / urimanager / uriManager.ml
index df707c956f2ba8f5e9de95d46480cf75d7cefdf9..6dad8ddef6c4095e4764497f21150d53c4e649e2 100644 (file)
@@ -35,26 +35,6 @@ let name_of_uri uri = uri.(Array.length uri - 1);;
 let buri_of_uri uri = uri.(Array.length uri - 3);;
 let depth_of_uri uri = Array.length uri - 2;;
 
-(*CSC: ora e' diventato poco efficiente, migliorare *)
-let relative_depth curi uri cookingsno =
- let rec length_of_current_prefix l1 l2 =
-  match (l1, l2) with
-     (he1::tl1, he2::tl2) when he1 == he2 ->
-       1 + length_of_current_prefix tl1 tl2
-   | (_,_) -> 0
- in
-  depth_of_uri uri -
-   length_of_current_prefix
-    (Array.to_list (Array.sub curi 0 (Array.length curi - (2 + cookingsno))))
-    (Array.to_list (Array.sub uri 0 (Array.length uri - 2)))
-  (*CSC: vecchio codice da eliminare
-  if eq curi uri then 0
-  else
-   depth_of_uri uri -
-    length_of_current_prefix (Array.to_list curi) (Array.to_list uri)
-  *)
-;;
-
 module OrderedStrings =
  struct
   type t = string