]> matita.cs.unibo.it Git - helm.git/blob - helm/software/components/ng_library/nCicLibrary.mli
Preparing for 0.5.9 release.
[helm.git] / helm / software / 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 automation_cache = NDiscriminationTree.DiscriminationTree.t
17 type unit_eq_cache = NCicParamod.state
18
19 class type g_eq_status =
20  object
21    method eq_cache : unit_eq_cache 
22  end
23
24 class eq_status :
25  object('self)
26   inherit g_eq_status
27   method set_eq_cache: unit_eq_cache -> 'self
28   method set_eq_status: #g_eq_status -> 'self
29  end
30
31 class type g_auto_status =
32  object
33   method auto_cache : automation_cache
34  end
35
36 class auto_status :
37  object('self)
38   inherit g_auto_status
39   method set_auto_cache: automation_cache -> 'self
40   method set_auto_status: #g_auto_status -> 'self
41  end
42
43 type timestamp
44
45 class type g_status =
46  object
47   method timestamp: timestamp
48   inherit NRstatus.g_status
49  end
50
51 class status :
52  object ('self)
53   inherit g_status
54   method set_timestamp: timestamp -> 'self
55   method set_library_status: #g_status -> 'self
56  end
57
58 (* it also checks it and add it to the environment *)
59 val add_obj: #status as 'status -> NCic.obj -> 'status
60 val add_constraint: 
61   #status as 'status -> NCic.universe -> NCic.universe -> 'status
62 val aliases_of: NUri.uri -> NReference.reference list
63 val resolve: string -> NReference.reference list
64 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
65 val get_obj: NUri.uri -> NCic.obj (* changes the current timestamp *)
66
67 val clear_cache : unit -> unit
68
69 val time_travel: #status -> unit
70 val decompile: baseuri:NUri.uri -> unit
71
72 val init: unit -> unit
73
74 type obj
75
76 class type g_dumpable_status =
77  object
78   inherit g_status
79   inherit g_auto_status
80   inherit g_eq_status
81   method dump: obj list
82  end
83   
84 class dumpable_status :
85  object ('self)
86   inherit status
87   inherit auto_status
88   inherit eq_status
89   inherit g_dumpable_status
90   method set_dump: obj list -> 'self
91   method set_dumpable_status: #g_dumpable_status -> 'self
92  end
93
94 type 'a register_type =
95  < run: 'status.
96     'a -> refresh_uri_in_universe:(NCic.universe ->
97       NCic.universe) -> refresh_uri_in_term:(NCic.term -> NCic.term) ->
98        (#dumpable_status as 'status) -> 'status >
99
100 module Serializer:
101  sig
102   val register: < run: 'a.  string -> 'a register_type -> ('a -> obj) >
103   val serialize: baseuri:NUri.uri -> obj list -> unit
104   val require: baseuri:NUri.uri -> (#dumpable_status as 'status) -> 'status
105  end
106
107 (* CSC: only required during old-to-NG phase, to be deleted *)
108 val refresh_uri: NUri.uri -> NUri.uri
109
110 (* EOF *)