+ (* brutal *)
+ prerr_endline "loading graphs...";
+ let dbd = HSql.quick_connect (LibraryDb.parse_dbd_conf ()) in
+ MetadataTypes.ownerize_tables (Helm_registry.get "matita.owner");
+ let uniq l =
+ HExtlib.list_uniq (List.sort UriManager.compare l)
+ in
+ let who_uses u =
+ uniq (List.map fst (MetadataDeps.inverse_deps ~dbd u))
+ in
+ let roots_alluris =
+ let rec fix acc l =
+ let acc, todo =
+ List.fold_left (fun (acc,todo) x ->
+ let w = who_uses x in
+ if w = [] then (x::acc,todo) else (acc,uniq (todo@w)))
+ (acc,[]) l
+ in
+ if todo = [] then uniq acc else fix acc todo
+ in
+ (fix [] alluris)
+ in
+ List.iter
+ (fun u ->
+ prerr_endline (" - "^UriManager.string_of_uri u);
+ try NCicEnvironment.load_graph u with exn -> ())
+ roots_alluris;
+ prerr_endline "finished....";
+ CicUniv.do_rank (NCicEnvironment.get_graph ());
+ prerr_endline "ranked....";