- (fun (u,_,_,_,_ as o) ->
- prerr_endline ("CHECK: " ^ NUri.string_of_uri u ^"\n"^NCicPp.ppobj o);
- try NCicTypeChecker.typecheck_obj o
- with
- | NCicTypeChecker.AssertFailure s
- | NCicTypeChecker.TypeCheckerFailure s -> prerr_endline (Lazy.force s)
- (*| CicEnvironment.Object_not_found s ->
- prerr_endline ("Obj not found: " ^ UriManager.string_of_uri s)*))
- l
+ (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....";
+ prerr_endline "caching objects";
+ HExtlib.profiling_enabled := false;
+ List.iter (fun uu ->
+ let uu= NUri.nuri_of_ouri uu in
+ indent := 0;
+(* prerr_endline ("************* INIZIO **************** " ^ NUri.string_of_uri uu); *)
+ let _,o = NCicEnvironment.get_obj uu in
+(* prerr_endline (NCicPp.ppobj o); *)
+ try
+ NCicTypeChecker.typecheck_obj o;
+(* prerr_endline ("************* FINE ****************" ^ NUri.string_of_uri uu); *)
+ with
+ | NCicTypeChecker.AssertFailure s
+ | NCicTypeChecker.TypeCheckerFailure s as e ->
+(* prerr_endline ("Obj: " ^ NCicPp.ppobj o); *)
+ prerr_endline ("######### " ^ Lazy.force s); raise e
+ | CicEnvironment.Object_not_found s ->
+ prerr_endline ("Obj not found: " ^ UriManager.string_of_uri s);
+ )
+ alluris;
+ NCicEnvironment.invalidate ();
+ Gc.compact ();
+ HExtlib.profiling_enabled := true;
+ prerr_endline "typechecking, first with the new and then with the old kernel";
+ let prima = Unix.gettimeofday () in
+ List.iter
+ (fun u ->
+ let u= NUri.nuri_of_ouri u in
+ indent := 0;
+ NCicTypeChecker.typecheck_obj (snd (NCicEnvironment.get_obj u)))
+ alluris;
+ let dopo = Unix.gettimeofday () in
+ Gc.compact ();
+ let dopo2 = Unix.gettimeofday () in
+ Printf.eprintf "NEW typing: %3.2f, gc: %3.2f\n%!" (dopo -. prima) (dopo2 -. dopo);
+ CicEnvironment.invalidate ();
+ Gc.compact ();
+ let prima = Unix.gettimeofday () in
+ List.iter (fun u -> ignore (CicTypeChecker.typecheck u)) alluris;
+ let dopo = Unix.gettimeofday () in
+ Gc.compact ();
+ let dopo2 = Unix.gettimeofday () in
+ Printf.eprintf "OLD typing: %3.2f, gc: %3.2f\n%!" (dopo -. prima) (dopo2 -. dopo)