X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fcic_proof_checking%2FcicEnvironment.ml;h=9875f17f6f722b7c5674a018cba684ab378e616a;hb=bc698deb9b8416c2b903b78a6053d59f6cc2a8ec;hp=8ae5c1b13c1a80a0cc9c974a05b71f8ccda6f49b;hpb=111df95ac03f2ee21dfa2422a7f531f675b1c16d;p=helm.git diff --git a/helm/software/components/cic_proof_checking/cicEnvironment.ml b/helm/software/components/cic_proof_checking/cicEnvironment.ml index 8ae5c1b13..9875f17f6 100644 --- a/helm/software/components/cic_proof_checking/cicEnvironment.ml +++ b/helm/software/components/cic_proof_checking/cicEnvironment.ml @@ -105,6 +105,7 @@ module Cache : val is_in_unchecked: UriManager.uri -> bool val is_in_cooked: UriManager.uri -> bool val list_all_cooked_uris: unit -> UriManager.uri list + val invalidate: unit -> unit end = struct @@ -143,6 +144,13 @@ module Cache : (* unchecked is used to store objects just fetched, nothing more. *) let unchecked_list = ref [];; + let invalidate _ = + let l = HT.fold (fun k (o,g,gl) acc -> (k,(o,Some (g,gl)))::acc) cacheOfCookedObjects [] in + unchecked_list := l ; + frozen_list := []; + HT.clear cacheOfCookedObjects; + ;; + let empty () = HT.clear cacheOfCookedObjects; unchecked_list := [] ; @@ -546,3 +554,7 @@ let list_obj () = debug_print (lazy "Who has removed the uri in the meanwhile?"); raise Not_found ;; + +let invalidate _ = + Cache.invalidate () +;;