]> matita.cs.unibo.it Git - helm.git/blob - matita/components/ng_library/nCicLibrary.mli
Use of standard OCaml syntax
[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 exception IncludedFileNotCompiled of string * string 
16
17 type timestamp
18
19 class virtual status :
20  object ('self)
21   inherit NCic.status
22   method timestamp: timestamp
23   method set_timestamp: timestamp -> 'self
24   (*CSC: bug here, we are not copying the NCicExtraction and OCamlExtraction part of the status *)
25  end
26
27 (* it also checks it and add it to the environment *)
28 val add_obj: (#status as 'status) -> NCic.obj -> 'status
29 val add_constraint: 
30   (#status as 'status) -> acyclic:bool ->
31   NCic.universe -> NCic.universe -> 'status
32 val aliases_of: NUri.uri -> NReference.reference list
33 val resolve: string -> NReference.reference list
34 (*
35 (* warning: get_obj may raise (NCicEnvironment.ObjectNotFoud l) *)
36 val get_obj: #NCic.status -> NUri.uri -> NCic.obj (* changes the current timestamp *)
37 *)
38
39 val time_travel: #status -> unit
40 val replace: #status -> unit
41
42 val init: unit -> unit
43
44 type obj
45 type dump
46
47 class type g_dumpable_status =
48  object
49   method dump: dump
50  end
51
52 class dumpable_status :
53  object ('self)
54   inherit g_dumpable_status
55   method set_dump: dump -> 'self
56   method set_dumpable_status: #g_dumpable_status -> 'self
57  end
58
59 val get_transitively_included: #dumpable_status -> NUri.uri list
60 val dump_obj: (#dumpable_status as 'status) -> obj -> 'status
61
62 module type SerializerType =
63  sig
64   type dumpable_status
65
66   type 'a register_type =
67    'a ->
68     refresh_uri_in_universe:(NCic.universe -> NCic.universe) ->
69     refresh_uri_in_term:(NCic.status -> NCic.term -> NCic.term) ->
70     refresh_uri_in_reference:(NReference.reference -> NReference.reference) ->
71     alias_only:bool ->
72      dumpable_status -> dumpable_status
73
74   val register: < run: 'a.  string -> 'a register_type -> ('a -> obj) >
75   val serialize: baseuri:NUri.uri -> dumpable_status -> unit
76   val require: baseuri:
77    NUri.uri -> fname:string -> alias_only:bool ->
78     dumpable_status -> dumpable_status
79   val dependencies_of: baseuri:NUri.uri -> string list
80  end
81
82 module Serializer(D: sig type dumpable_s = private #dumpable_status end) :
83   SerializerType with type dumpable_status = D.dumpable_s
84
85 val refresh_uri: NUri.uri -> NUri.uri
86
87 val ng_path_of_baseuri: ?no_suffix:bool -> NUri.uri -> string
88 (* EOF *)