X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicEnvironment.ml;h=5c1daa1373be26c35df429e23e6789847db69f5d;hb=57ad518c58e0b9684c5ea696a359037bed18dbc9;hp=461c3edc62f49d595cdb49fc5e82b23c0c15984e;hpb=502eecdd0e3d63c7e1a647c633b588e738f0afcf;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicEnvironment.ml b/helm/ocaml/cic_proof_checking/cicEnvironment.ml index 461c3edc6..5c1daa137 100644 --- a/helm/ocaml/cic_proof_checking/cicEnvironment.ml +++ b/helm/ocaml/cic_proof_checking/cicEnvironment.ml @@ -99,6 +99,7 @@ module Cache : val is_in_frozen: UriManager.uri -> bool val is_in_unchecked: UriManager.uri -> bool val is_in_cooked: UriManager.uri -> bool + val list_all_cooked_uris: unit -> UriManager.uri list end = struct @@ -458,6 +459,10 @@ module Cache : HT.remove cacheOfCookedObjects uri ;; + let list_all_cooked_uris () = + HT.fold (fun u _ l -> u::l) cacheOfCookedObjects [] + ;; + end ;; @@ -675,4 +680,19 @@ let in_library uri = with Http_getter_types.Key_not_found _ -> false) let remove_term = Cache.remove + +let list_uri () = + Cache.list_all_cooked_uris () +;; +let list_obj () = + try + List.map (fun u -> + let o,ug = get_obj CicUniv.empty_ugraph u in + (u,o,ug)) + (list_uri ()) + with + Not_found -> + prerr_endline "Who has removed the uri in the meanwhile?"; + raise Not_found +;;