]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic_disambiguation/disambiguate.ml
- changed license to lgpl
[helm.git] / helm / ocaml / cic_disambiguation / disambiguate.ml
index 7237c8fb72d0d5acc664e438ac2a0795618dd4a3..9f4c41d2e709e608b5f7497d27692d6737736598 100644 (file)
@@ -67,10 +67,11 @@ let refine metasenv context term ugraph =
        (Ok (term', metasenv')),ugraph1
     with
       | CicRefine.Uncertain _ ->
-          debug_print ("%%% UNCERTAIN!!! " ^ CicPp.ppterm term) ;
+          debug_print ("UNCERTAIN!!! " ^ CicPp.ppterm term) ;
           Uncertain,ugraph
-      | CicRefine.RefineFailure _ ->
-          debug_print ("%%% PRUNED!!! " ^ CicPp.ppterm term) ;
+      | CicRefine.RefineFailure msg ->
+          debug_print (sprintf "PRUNED!!!\nterm%s\nmessage:%s"
+            (CicPp.ppterm term) msg);
           Ko,ugraph
       | CicUnification.UnificationFailure s -> 
         prerr_endline ("PASSADI QUI: " ^ s);
@@ -79,7 +80,9 @@ let refine metasenv context term ugraph =
 let resolve (env: environment) (item: domain_item) ?(num = "") ?(args = []) () =
   try
     snd (Environment.find item env) env num args
-  with Not_found -> assert false
+  with Not_found -> 
+    failwith ("Domain item not found: " ^ 
+      (DisambiguateTypes.string_of_domain_item item))
 
   (* TODO move it to Cic *)
 let find_in_environment name context =
@@ -447,7 +450,7 @@ module Make (C: Callbacks) =
         uris
 
     let disambiguate_term ~(dbd:Mysql.dbd) context metasenv term
-      ?(initial_ugraph = CicUniv.empty_ugraph)  ~aliases:current_env
+      ?(initial_ugraph = CicUniv.empty_ugraph) ~aliases:current_env
     =
       debug_print "NEW DISAMBIGUATE INPUT";
       let disambiguate_context =  (* cic context -> disambiguate context *)