]> matita.cs.unibo.it Git - helm.git/blob - matita/components/ng_library/nCicLibrary.mli
bad0d89752eddcaa92658a49cde7ee51614901e7
[helm.git] / matita / components / ng_library / 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  end
23
24 (* it also checks it and add it to the environment *)
25 val add_obj: #status as 'status -> NCic.obj -> 'status
26 val add_constraint: 
27   #status as 'status -> NCic.universe -> NCic.universe -> 'status
28 val aliases_of: NUri.uri -> NReference.reference list
29 val resolve: string -> NReference.reference list
30 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
31 val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *)
32
33 val clear_cache : unit -> unit
34
35 val time_travel: #status -> unit
36 val decompile: baseuri:NUri.uri -> unit
37
38 val init: unit -> unit
39
40 type obj
41
42 module type SerializerType =
43  sig
44   type dumpable_status
45
46   type 'a register_type =
47    'a ->
48     refresh_uri_in_universe:(NCic.universe -> NCic.universe) ->
49     refresh_uri_in_term:(NCic.term -> NCic.term) ->
50      dumpable_status -> dumpable_status
51
52   val register: < run: 'a.  string -> 'a register_type -> ('a -> obj) >
53   val serialize: baseuri:NUri.uri -> obj list -> unit
54    (* the obj is the "include" command to be added to the dump list *)
55   val require: baseuri:NUri.uri -> dumpable_status -> dumpable_status * obj
56  end
57
58 module Serializer(D: sig type dumpable_status end) :
59   SerializerType with type dumpable_status = D.dumpable_status
60
61 class dumpable_status :
62  object ('self)
63   method dump: obj list
64   method set_dump: obj list -> 'self
65  end
66
67 (* CSC: only required during old-to-NG phase, to be deleted *)
68 val refresh_uri: NUri.uri -> NUri.uri
69
70 (* EOF *)