*)
+let recons_univ u =
+ match u with
+ | i, None -> u
+ | i, Some uri ->
+ i, Some (UriManager.uri_of_string (UriManager.string_of_uri uri))
+
+let recons_entry entry =
+ let recons_set set =
+ SOF.fold (fun univ set -> SOF.add (recons_univ univ) set) set SOF.empty
+ in
+ {
+ eq_closure = recons_set entry.eq_closure;
+ ge_closure = recons_set entry.ge_closure;
+ gt_closure = recons_set entry.gt_closure;
+ in_gegt_of = recons_set entry.in_gegt_of;
+ one_s_eq = recons_set entry.one_s_eq;
+ one_s_ge = recons_set entry.one_s_ge;
+ one_s_gt = recons_set entry.one_s_gt;
+ }
+
+let recons_graph graph =
+ MAL.fold
+ (fun universe entry map ->
+ MAL.add (recons_univ universe) (recons_entry entry) map)
+ graph MAL.empty
+
(* EOF *)
val restart_numbering:
unit -> unit
+ (** re-hash-cons URIs contained in the given universe so that phisicaly
+ * equality could be enforced. Mainly used by
+ * CicEnvironment.restore_from_channel *)
+val recons_graph: universe_graph -> universe_graph
+
(*
Benchmarking stuff
*)
(***********************************************
TSSI: FIXME add channel stuff for universes
************************************************)
- (restore_uris v,u))
+ (restore_uris v, CicUniv.recons_graph u))
restored
;;