X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Flibrary%2FlibrarySync.mli;h=bfab37330cfadf71dabffd2143b4f3ed91597801;hb=e9b09b14538f770b9e65083c24e3e9cf487df648;hp=96e9231009b58cb4b7df425d6eee90db73f073fa;hpb=686ad41d7c9431094c12dae0fa6b84a898c38e84;p=helm.git diff --git a/helm/software/components/library/librarySync.mli b/helm/software/components/library/librarySync.mli index 96e923100..bfab37330 100644 --- a/helm/software/components/library/librarySync.mli +++ b/helm/software/components/library/librarySync.mli @@ -25,20 +25,25 @@ exception AlreadyDefined of UriManager.uri -(* this is a pointer to the function which builds the inversion principle *) -val build_inversion_principle: (UriManager.uri-> Cic.obj -> (UriManager.uri * Cic.obj) list) ref +type coercion_decl = + UriManager.uri -> int (* arity *) -> + int (* saturations *) -> string (* baseuri *) -> + UriManager.uri list (* lemmas (new objs) *) + +(* the add_single_obj fun passed to the callback can raise AlreadyDefined *) +val add_object_declaration_hook : + (add_obj:(UriManager.uri -> Cic.obj -> UriManager.uri list) -> + add_coercion:coercion_decl -> + UriManager.uri -> Cic.obj -> UriManager.uri list) -> unit (* adds an object to the library together with all auxiliary lemmas on it *) (* (e.g. elimination principles, projections, etc.) *) (* it returns the list of the uris of the auxiliary lemmas generated *) val add_obj: - RefinementTool.kit -> - UriManager.uri -> Cic.obj -> + UriManager.uri -> Cic.obj -> pack_coercion_obj:(Cic.obj -> Cic.obj) -> UriManager.uri list -(* inverse of add_obj; *) -(* Warning: it does not remove the dependencies on the object and on its *) -(* auxiliary lemmas! *) +(* removes an object (does not remove its associated lemmas) *) val remove_obj: UriManager.uri -> unit (* Informs the library that [uri] is a coercion. *) @@ -46,15 +51,9 @@ val remove_obj: UriManager.uri -> unit (* is true are added to the library. *) (* The list of added objects is returned. *) val add_coercion: - add_composites:bool -> - RefinementTool.kit -> UriManager.uri -> int (* arity *) -> - string (* baseuri *) -> - (UriManager.uri * int) list (* URI and arity *) - -(* inverse of add_coercion, removes both the eventually created composite *) -(* coercions and the information that [uri] and the composites are coercion *) -val remove_coercion: UriManager.uri -> unit - -(* mh... *) -val remove_all_coercions: unit -> unit + add_composites:bool -> pack_coercion_obj:(Cic.obj -> Cic.obj) -> coercion_decl +(* these just push/pop the coercions database, since the library is not + * pushable/poppable *) +val push: unit -> unit +val pop: unit -> unit