From: Ferruccio Guidi Date: Tue, 26 Feb 2008 17:23:37 +0000 (+0000) Subject: I added some debugging information X-Git-Tag: make_still_working~5574 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d9b8131affff81514d792aa06d147b5375963b1f;p=helm.git I added some debugging information --- diff --git a/helm/software/components/grafite_parser/grafiteDisambiguate.ml b/helm/software/components/grafite_parser/grafiteDisambiguate.ml index ca3bc0b90..308144c21 100644 --- a/helm/software/components/grafite_parser/grafiteDisambiguate.ml +++ b/helm/software/components/grafite_parser/grafiteDisambiguate.ml @@ -36,16 +36,20 @@ type lazy_tactic = (Cic.term, Cic.lazy_term, Cic.lazy_term GrafiteAst.reduction, string) GrafiteAst.tactic -let singleton = function +let singleton msg = function | [x], _ -> x - | _ -> assert false -;; + | l, _ -> + let debug = + Printf.sprintf "GrafiteDisambiguate.singleton (%s): %u interpretations" + msg (List.length l) + in + HLog.debug debug; assert false (** @param term not meaningful when context is given *) let disambiguate_term text prefix_len lexicon_status_ref context metasenv term = let lexicon_status = !lexicon_status_ref in let (diff, metasenv, cic, _) = - singleton + singleton "first" (GrafiteDisambiguator.disambiguate_term ~dbd:(LibraryDb.instance ()) ~aliases:lexicon_status.LexiconEngine.aliases ~universe:(Some lexicon_status.LexiconEngine.multi_aliases) @@ -65,7 +69,7 @@ let disambiguate_lazy_term text prefix_len lexicon_status_ref term = (fun context metasenv ugraph -> let lexicon_status = !lexicon_status_ref in let (diff, metasenv, cic, ugraph) = - singleton + singleton "second" (GrafiteDisambiguator.disambiguate_term ~dbd:(LibraryDb.instance ()) ~initial_ugraph:ugraph ~aliases:lexicon_status.LexiconEngine.aliases ~universe:(Some lexicon_status.LexiconEngine.multi_aliases) @@ -418,7 +422,7 @@ let disambiguate_obj lexicon_status ?baseuri metasenv (text,prefix_len,obj) = | CicNotationPt.Inductive _ -> assert false | CicNotationPt.Theorem _ -> None in let (diff, metasenv, cic, _) = - singleton + singleton "third" (GrafiteDisambiguator.disambiguate_obj ~dbd:(LibraryDb.instance ()) ~aliases:lexicon_status.LexiconEngine.aliases ~universe:(Some lexicon_status.LexiconEngine.multi_aliases) ~uri