]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_kernel/nCicLibrary.mli
1) Include files for NG were neither recursively processes nor accumulated.
[helm.git] / helm / software / components / ng_kernel / nCicLibrary.mli
1 (*
2     ||M||  This file is part of HELM, an Hypertextual, Electronic        
3     ||A||  Library of Mathematics, developed at the Computer Science     
4     ||T||  Department, University of Bologna, Italy.                     
5     ||I||                                                                
6     ||T||  HELM is free software; you can redistribute it and/or         
7     ||A||  modify it under the terms of the GNU General Public License   
8     \   /  version 2 or (at your option) any later version.      
9      \ /   This software is distributed as is, NO WARRANTY.     
10       V_______________________________________________________________ *)
11
12 (* $Id$ *)
13
14 exception LibraryOutOfSync of string Lazy.t
15
16 type timestamp
17
18 class status :
19  object ('self)
20   method timestamp: timestamp
21   method set_timestamp: timestamp -> 'self
22   method set_library_status: <timestamp: timestamp; ..> -> 'self
23  end
24
25 (* it also checks it and add it to the environment *)
26 val add_obj: #status as 'status -> NCic.obj -> 'status
27 val add_constraint: 
28   #status as 'status -> bool -> NCic.universe -> NCic.universe -> 'status
29 val aliases_of: NUri.uri -> NReference.reference list
30 val resolve: string -> NReference.reference list
31 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
32 val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *)
33
34 val clear_cache : unit -> unit
35
36 val time_travel: #status -> unit
37 val decompile: baseuri:NUri.uri -> unit
38
39 module type Serializer =
40  sig
41   type status
42   type obj
43   val register:
44    string ->
45     ('a -> refresh_uri_in_universe:(NCic.universe -> NCic.universe) -> refresh_uri_in_term:(NCic.term -> NCic.term) -> status -> status) ->
46     ('a -> obj)
47   val serialize: baseuri:NUri.uri -> obj list -> unit
48   val require: baseuri:NUri.uri -> status -> status
49  end
50
51 module Serializer(S: sig type status end): Serializer with type status= S.status
52
53 val init: unit -> unit
54
55 (* CSC: only required during old-to-NG phase, to be deleted *)
56 val refresh_uri: NUri.uri -> NUri.uri
57
58 (* EOF *)