]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/rt.ml
Added to flags to activate/disactivate pretty-printing and exception catching.
[helm.git] / helm / software / components / ng_kernel / rt.ml
1 let _ =
2   Helm_registry.load_from "conf.xml";
3   NCicPp.set_ppterm NCicPp.trivial_pp_term;
4   let u = UriManager.uri_of_string Sys.argv.(1) in
5   let o, _ = CicEnvironment.get_obj CicUniv.oblivion_ugraph u in
6   prerr_endline "VECCHIO";
7   prerr_endline (CicPp.ppobj o);
8   let l = OCic2NCic.convert_obj u o in
9   (* fill the new env *)
10   let _ = NCicEnvironment.get_obj (NUri.nuri_of_ouri u) in
11   prerr_endline "OGGETTI:.........................................";
12   List.iter (fun o -> prerr_endline (NCicPp.ppobj o)) l;
13   prerr_endline "/OGGETTI:.........................................";
14   let objs = 
15     List.flatten 
16     (List.map NCic2OCic.convert_nobj l) in
17   List.iter 
18    (fun (u,o) -> 
19      prerr_endline ("round trip: " ^ UriManager.string_of_uri u);
20      prerr_endline (CicPp.ppobj o);
21      prerr_endline "tipo.......";
22      try CicTypeChecker.typecheck_obj u o
23      with
24        CicTypeChecker.TypeCheckerFailure s
25      | CicTypeChecker.AssertFailure s ->
26        prerr_endline (Lazy.force s)
27      | CicEnvironment.Object_not_found uri ->
28        prerr_endline
29         ("CicEnvironment: Object not found " ^ UriManager.string_of_uri uri))
30    objs;
31 ;;