]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_refiner/rt.ml
Preparing for 0.5.9 release.
[helm.git] / helm / software / components / ng_refiner / rt.ml
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id$ *)
13
14 let _ =
15   Helm_registry.load_from "conf.xml";
16   CicParser.impredicative_set := false;
17   let u = UriManager.uri_of_string Sys.argv.(1) in
18   let o, _ = CicEnvironment.get_obj CicUniv.oblivion_ugraph u in
19   prerr_endline "VECCHIO";
20   prerr_endline (CicPp.ppobj o);
21   let l = OCic2NCic.convert_obj u o in
22   prerr_endline "OGGETTI:.........................................";
23   List.iter (fun o -> prerr_endline (NCicPp.ppobj o)) l;
24   prerr_endline "/OGGETTI:.........................................";
25   let objs = 
26     List.flatten 
27     (List.map NCic2OCic.convert_nobj l) in
28   List.iter 
29    (fun (u,o) -> 
30      prerr_endline ("round trip: " ^ UriManager.string_of_uri u);
31      prerr_endline (CicPp.ppobj o);
32      prerr_endline "tipo.......";
33      try CicTypeChecker.typecheck_obj u o
34      with
35        CicTypeChecker.TypeCheckerFailure s
36      | CicTypeChecker.AssertFailure s ->
37        prerr_endline (Lazy.force s)
38      | CicEnvironment.Object_not_found uri ->
39        prerr_endline
40         ("CicEnvironment: Object not found " ^ UriManager.string_of_uri uri))
41    objs;
42 ;;