X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic%2FcicUniv.mli;h=d2b2483a19b5b331b7c9a601d5ebe674e9051950;hb=de9a83f286eee12117fb478ea2db18f7faebac9a;hp=d7eb7dc413e9bb6e460b3cd645f09dd2e07e2485;hpb=c5d5bf37b1e4c4b9b499ed2cbfe27cf2ec181944;p=helm.git diff --git a/helm/ocaml/cic/cicUniv.mli b/helm/ocaml/cic/cicUniv.mli index d7eb7dc41..d2b2483a1 100644 --- a/helm/ocaml/cic/cicUniv.mli +++ b/helm/ocaml/cic/cicUniv.mli @@ -23,17 +23,103 @@ * http://helm.cs.unibo.it/ *) + +(* + The strings contains an unreadable message +*) +exception UniverseInconsistency of string + +(* + Cic.Type of universe +*) type universe -val fresh: unit -> universe -val add_eq: universe -> universe -> bool -val add_ge: universe -> universe -> bool -val add_gt: universe -> universe -> bool (* -val string_of_universe: universe -> string -val print_map: unit -> unit + Opaque data structure you will use to store constraints +*) +type universe_graph + +(* + returns a fresh universe +*) +val fresh: + unit -> universe + +(* + really useful at the begin and in all the functions that don't care + of universes +*) +val empty_ugraph: universe_graph + +(* + These are the real functions to add eq/ge/gt constraints + to the passed graph, returning an updated graph or raising + UniverseInconsistency +*) +val add_eq: + ?fast:bool -> universe -> universe -> universe_graph -> universe_graph +val add_ge: + ?fast:bool -> universe -> universe -> universe_graph -> universe_graph +val add_gt: + ?fast:bool -> universe -> universe -> universe_graph -> universe_graph + +(* + debug function to print the graph to standard error +*) +val print_ugraph: + universe_graph -> unit + +(* + does what expected, but I don't remember why this was exported +*) +val string_of_universe: + universe -> string + +(* + given the list of visible universes (see universes_of_obj) returns a + cleaned graph (cleaned from the not visible nodes) *) +val clean_ugraph: + universe_graph -> universe list -> universe_graph -val reset: unit -> unit +(* + 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 +*) +val fill_empty_nodes_with_uri: + universe_graph -> UriManager.uri -> universe_graph + +(* + makes a union. + TODO: + - remember already merged uri so that we completely skip already merged + graphs, this may include a dependecy graph (not merge a subpart of an + already merged graph) +*) +val merge_ugraphs: + universe_graph -> universe_graph -> universe_graph -(* val check_status_eq: universe list -> bool *) +(* + ugraph to xml file and viceversa +*) +val write_xml_of_ugraph: + string -> universe_graph -> unit + +(* + given a filename parses the xml and returns the data structure +*) +val ugraph_of_xml: + string -> universe_graph +val restart_numbering: + unit -> unit + + (** 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 + +(* + Benchmarking stuff +*) +val get_spent_time: unit -> float +val reset_spent_time: unit -> unit