X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Furimanager%2FuriManager.ml;h=b4bf073e2733401ffe760a1aa5ab14ff444563c9;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=1ca99d9726eef6df41c10c97eca771d02073abda;hpb=5e6e4586c8d8bd1707a38c5f24427fcfb1065d05;p=helm.git diff --git a/helm/ocaml/urimanager/uriManager.ml b/helm/ocaml/urimanager/uriManager.ml index 1ca99d972..b4bf073e2 100644 --- a/helm/ocaml/urimanager/uriManager.ml +++ b/helm/ocaml/urimanager/uriManager.ml @@ -81,8 +81,10 @@ exception IllFormedUri of string;; let _dottypes = ".types" let _types = "types",5 -let _ann = "ann",3 +let _dotuniv = ".univ" +let _univ = "univ",4 let _dotann = ".ann" +let _ann = "ann",3 let _var = "var",3 let _dotbody = ".body" let _con = "con",3 @@ -92,6 +94,7 @@ let _con3 = "con" let _var3 = "var" let _ind3 = "ind" let _ann3 = "ann" +let _univ4 = "univ" let _types5 = "types" let _xpointer8 = "xpointer" let _cic5 = "cic:/" @@ -102,9 +105,11 @@ let is_malformed suri = else let len = String.length suri - 5 in let last5 = String.sub suri len 5 in + let last4 = String.sub last5 1 4 in let last3 = String.sub last5 2 3 in if last3 = _con3 || last3 = _var3 || last3 = _ind3 || - last3 = _ann3 || last5 = _types5 || last5 = _dotbody then + last3 = _ann3 || last5 = _types5 || last5 = _dotbody || + last4 = _univ4 then false else try @@ -177,9 +182,15 @@ let bodyuri_of_uri (uri, _) = None ;; +(* these are bugged! + * we should remove _types, _univ, _ann all toghether *) let innertypesuri_of_uri (uri, _) = uri_of_string ((clear_suffix uri _types) ^ _dottypes) ;; +let univgraphuri_of_uri (uri,_) = + uri_of_string ((clear_suffix uri _univ) ^ _dotuniv) +;; + let uri_of_uriref (uri, _) typeno consno = let typeno = typeno + 1 in @@ -200,3 +211,13 @@ end module UriSet = Set.Make (OrderedUri) +module HashedUri = +struct + type t = uri + let equal = eq + let hash = snd +end + +module UriHashtbl = Hashtbl.Make (HashedUri) + +