X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic%2FcicUniv.mli;h=be8c28bf3e105c20ac17a6673ae5fa6ecbd637e0;hb=4167cea65ca58897d1a3dbb81ff95de5074700cc;hp=71ad1ef00b7b73f5e10092c97f723d4ffcfc50d7;hpb=31851952e1cc2db59168c5fd6f6093d9bc37ea86;p=helm.git diff --git a/helm/ocaml/cic/cicUniv.mli b/helm/ocaml/cic/cicUniv.mli index 71ad1ef00..be8c28bf3 100644 --- a/helm/ocaml/cic/cicUniv.mli +++ b/helm/ocaml/cic/cicUniv.mli @@ -43,8 +43,14 @@ type universe_graph returns a fresh universe *) val fresh: - unit -> universe + ?uri:UriManager.uri -> + ?id:int -> + unit -> + universe + (* names a universe if unnamed *) +val name_universe: universe -> UriManager.uri -> universe + (* really useful at the begin and in all the functions that don't care of universes @@ -85,9 +91,12 @@ val clean_ugraph: (* Since fresh() can't add the right uri to each node, you must fill empty nodes with the uri before you serialize the graph to xml + + these empty nodes are also filled in the universe list *) val fill_empty_nodes_with_uri: - universe_graph -> UriManager.uri -> universe_graph + universe_graph -> universe list -> UriManager.uri -> + universe_graph * universe list (* makes a union. @@ -103,16 +112,39 @@ val merge_ugraphs: ugraph to xml file and viceversa *) val write_xml_of_ugraph: - string -> universe_graph -> unit + string -> universe_graph -> universe list -> unit (* given a filename parses the xml and returns the data structure *) -val ugraph_of_xml: - string -> universe_graph +val ugraph_and_univlist_of_xml: + string -> universe_graph * universe list val restart_numbering: unit -> unit +(* + returns the universe number (used to save it do xml) +*) +val univno: universe -> int + + (** re-hash-cons URIs contained in the given universe so that phisicaly + * equality could be enforced. Mainly used by + * CicEnvironment.restore_from_channel *) +val recons_graph: universe_graph -> universe_graph + + (** re-hash-cons a single universe *) +val recons_univ: universe -> universe + + (** consistency chek that should be done before committin the graph to the + * cache *) +val assert_univs_have_uri: universe_graph -> universe list-> unit + + (** asserts the universe is named *) +val assert_univ: universe -> unit + +val compare: universe -> universe -> int +val eq: universe -> universe -> bool + (* Benchmarking stuff *)