]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/ng_kernel/check.ml
uffa
[helm.git] / helm / software / components / ng_kernel / check.ml
index d10b771aad2b249618ba4178db18ceba1cd955a6..8f014d4d20ab733e30f3e368cab072da7c9a6c4c 100644 (file)
@@ -53,15 +53,15 @@ let logger =
 
 let mk_type n = 
   if n = 0 then
-     [false, NUri.uri_of_string ("cic:/matita/pts/Type.univ")]
+     [`Type, NUri.uri_of_string ("cic:/matita/pts/Type.univ")]
   else
-     [false, NUri.uri_of_string ("cic:/matita/pts/Type"^string_of_int n^".univ")]
+     [`Type, NUri.uri_of_string ("cic:/matita/pts/Type"^string_of_int n^".univ")]
 ;;
 let mk_cprop n = 
   if n = 0 then 
-    [false, NUri.uri_of_string ("cic:/matita/pts/CProp.univ")]
+    [`CProp, NUri.uri_of_string ("cic:/matita/pts/Type.univ")]
   else
-    [false, NUri.uri_of_string ("cic:/matita/pts/CProp"^string_of_int n^".univ")]
+    [`CProp, NUri.uri_of_string ("cic:/matita/pts/Type"^string_of_int n^".univ")]
 ;;
 
 
@@ -151,16 +151,9 @@ let _ =
     try
     let rec aux = function
       | a::(b::_ as tl) ->
-         NCicEnvironment.add_constraint true (mk_type a) (mk_type b);
-         NCicEnvironment.add_constraint true (mk_cprop a) (mk_cprop b);
-         NCicEnvironment.add_constraint true (mk_cprop a) (mk_type b);
-         NCicEnvironment.add_constraint true (mk_type a) (mk_cprop b);
-         NCicEnvironment.add_constraint false (mk_cprop a) (mk_type a);
-         NCicEnvironment.add_constraint false (mk_type a) (mk_cprop a);
+         NCicEnvironment.add_lt_constraint (mk_type a) (mk_type b);
+         NCicEnvironment.add_lt_constraint (mk_type a) (mk_cprop b);
          aux tl
-      | [a] -> 
-         NCicEnvironment.add_constraint false (mk_type a) (mk_cprop a);
-         NCicEnvironment.add_constraint false (mk_cprop a) (mk_type a);
       | _ -> ()
     in
        aux lll
@@ -176,7 +169,7 @@ let _ =
     let o = NCicLibrary.get_obj uu in
     if print_object then prerr_endline (NCicPp.ppobj o); 
     try 
-      NCicTypeChecker.typecheck_obj o
+      NCicEnvironment.check_and_add_obj o
     with 
     exn ->
       let rec aux = function
@@ -204,9 +197,9 @@ let _ =
   let prima = Unix.gettimeofday () in
   List.iter 
     (fun u ->
-       let u= OCic2NCic.nuri_of_ouri u in
+      let u= OCic2NCic.nuri_of_ouri u in
       indent := 0;
-      NCicTypeChecker.typecheck_obj (NCicLibrary.get_obj u))
+      ignore (NCicEnvironment.get_checked_obj u))
     alluris;
   let dopo = Unix.gettimeofday () in
   Gc.compact ();