- match obj with
- | CicNotationPt.Inductive (_,(name,_,_,_)::_)
- | CicNotationPt.Record (_,name,_,_) ->
- (match baseuri with
- | Some baseuri ->
- Some (UriManager.uri_of_string (baseuri ^ "/" ^ name ^ ".ind"))
- | None -> raise BaseUriNotSetYet)
- | CicNotationPt.Inductive _ -> assert false
- | CicNotationPt.Theorem _ -> None in
-(* let time = Unix.gettimeofday () in *)
- let (diff, metasenv, _, cic, _) =
- singleton "third"
- (CicDisambiguate.disambiguate_obj
- ~lookup_in_library
- ~mk_choice:cic_mk_choice
- ~mk_implicit
- ~description_of_alias:LexiconAst.description_of_alias
- ~aliases:lexicon_status.LexiconEngine.aliases
- ~universe:(Some lexicon_status.LexiconEngine.multi_aliases) ~uri
- (text,prefix_len,obj)) in
-(*
- let time = Unix.gettimeofday () -. time in
- prerr_endline ("VECCHIA DISAMBIGUAZIONE: " ^ string_of_float time);
-*)
-(*
- (let time = Unix.gettimeofday () in
- prerr_endline "INIZIO NUOVA DISAMBIGUAZIONE";
- (match obj with
- CicNotationPt.Theorem (_,_,ty,_) ->
+ let baseuri =
+ match baseuri with Some x -> x | None -> raise BaseUriNotSetYet
+ in
+ let name =
+ match obj with
+ | CicNotationPt.Inductive (_,(name,_,_,_)::_)
+ | CicNotationPt.Record (_,name,_,_) -> name ^ ".ind"
+ | CicNotationPt.Theorem (_,name,_,_) -> name ^ ".con"
+ | CicNotationPt.Inductive _ -> assert false
+ in
+ UriManager.uri_of_string (baseuri ^ "/" ^ name)
+ in
+ let _try_new cic =
+ (NCicLibrary.clear_cache ();
+ NCicEnvironment.invalidate ();
+ OCic2NCic.clear ();