]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/rt.ml
added a pretty printing of the new object and use argv[1] as uri
[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   let l = OCic2NCic.convert_obj u o in
7   List.iter (fun o -> prerr_endline (NCicPp.ppobj o)) l;
8   let objs = 
9     List.flatten 
10     (List.map NCic2OCic.convert_nobj l) in
11   List.iter 
12    (fun (u,o) -> 
13      prerr_endline ("------- " ^ UriManager.string_of_uri u);
14      prerr_endline (CicPp.ppobj o);
15      try CicTypeChecker.typecheck_obj u o
16      with
17        CicTypeChecker.TypeCheckerFailure s
18      | CicTypeChecker.AssertFailure s ->
19        prerr_endline (Lazy.force s)
20      | CicEnvironment.Object_not_found uri ->
21        prerr_endline
22         ("CicEnvironment: Object not found " ^ UriManager.string_of_uri uri))
23    objs;
24 ;;