X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fng_library%2FnCicLibrary.mli;h=165b70ce19156e6d55c0f62030be3b7e0f2ea9bf;hb=f00a612006ac05f49a42ab507a95d3298bc1457a;hp=03b84439711b872d317aa295c04fd6880f7570f6;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/ng_library/nCicLibrary.mli b/matita/components/ng_library/nCicLibrary.mli index 03b844397..165b70ce1 100644 --- a/matita/components/ng_library/nCicLibrary.mli +++ b/matita/components/ng_library/nCicLibrary.mli @@ -12,99 +12,77 @@ (* $Id$ *) exception LibraryOutOfSync of string Lazy.t - -type automation_cache = NDiscriminationTree.DiscriminationTree.t -type unit_eq_cache = NCicParamod.state - -class type g_eq_status = - object - method eq_cache : unit_eq_cache - end - -class eq_status : - object('self) - inherit g_eq_status - method set_eq_cache: unit_eq_cache -> 'self - method set_eq_status: #g_eq_status -> 'self - end - -class type g_auto_status = - object - method auto_cache : automation_cache - end - -class auto_status : - object('self) - inherit g_auto_status - method set_auto_cache: automation_cache -> 'self - method set_auto_status: #g_auto_status -> 'self - end +exception IncludedFileNotCompiled of string * string type timestamp -class type g_status = - object - method timestamp: timestamp - inherit NRstatus.g_status - end - -class status : +class virtual status : object ('self) - inherit g_status + inherit NCic.status + method timestamp: timestamp method set_timestamp: timestamp -> 'self - method set_library_status: #g_status -> 'self + (*CSC: bug here, we are not copying the NCicExtraction and OCamlExtraction part of the status *) end (* it also checks it and add it to the environment *) val add_obj: #status as 'status -> NCic.obj -> 'status val add_constraint: - #status as 'status -> NCic.universe -> NCic.universe -> 'status + #status as 'status -> acyclic:bool -> + NCic.universe -> NCic.universe -> 'status val aliases_of: NUri.uri -> NReference.reference list val resolve: string -> NReference.reference list +(* (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *) -val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *) - -val clear_cache : unit -> unit +val get_obj: #NCic.status -> NUri.uri -> NCic.obj (* changes the current timestamp *) +*) val time_travel: #status -> unit -val decompile: baseuri:NUri.uri -> unit +val replace: #status -> unit val init: unit -> unit type obj +type dump class type g_dumpable_status = object - inherit g_status - inherit g_auto_status - inherit g_eq_status - method dump: obj list + method dump: dump end - + class dumpable_status : object ('self) - inherit status - inherit auto_status - inherit eq_status inherit g_dumpable_status - method set_dump: obj list -> 'self + method set_dump: dump -> 'self method set_dumpable_status: #g_dumpable_status -> 'self end -type 'a register_type = - < run: 'status. - 'a -> refresh_uri_in_universe:(NCic.universe -> - NCic.universe) -> refresh_uri_in_term:(NCic.term -> NCic.term) -> - (#dumpable_status as 'status) -> 'status > +val get_transitively_included: #dumpable_status -> NUri.uri list +val dump_obj: #dumpable_status as 'status -> obj -> 'status -module Serializer: +module type SerializerType = sig + type dumpable_status + + type 'a register_type = + 'a -> + refresh_uri_in_universe:(NCic.universe -> NCic.universe) -> + refresh_uri_in_term:(NCic.status -> NCic.term -> NCic.term) -> + refresh_uri_in_reference:(NReference.reference -> NReference.reference) -> + alias_only:bool -> + dumpable_status -> dumpable_status + val register: < run: 'a. string -> 'a register_type -> ('a -> obj) > - val serialize: baseuri:NUri.uri -> obj list -> unit - val require: baseuri:NUri.uri -> (#dumpable_status as 'status) -> 'status + val serialize: baseuri:NUri.uri -> dumpable_status -> unit + val require: baseuri: + NUri.uri -> fname:string -> alias_only:bool -> + dumpable_status -> dumpable_status + val dependencies_of: baseuri:NUri.uri -> string list end -(* CSC: only required during old-to-NG phase, to be deleted *) +module Serializer(D: sig type dumpable_s = private #dumpable_status end) : + SerializerType with type dumpable_status = D.dumpable_s + val refresh_uri: NUri.uri -> NUri.uri +val ng_path_of_baseuri: ?no_suffix:bool -> NUri.uri -> string (* EOF *)