Module Oug_data


module Oug_data: sig .. end
Global graph.

module Mod_dep: Oug_graph.S  with type key = Oug_types.elt_id and type edge_data = unit

type 'a t = {
   modules : Oug_mod.t; (*All modules gathered as a big module*)
   elts : Oug_types.Elt_set.t;
   mod_ids : Oug_types.elt_id Oug_types.Module_map.t; (*Get the module id of a module in the graph, from a pair (module_name, intf) where intf is Some true when looking for the interface module or Some false for the implementation.*)
   orig_mods : (Oug_mod.t * Oug_types.elt_id Oug_types.Elt_map.t) Oug_types.Elt_map.t; (*Access to original module structure from its id, with the map from original element ids to their ids in the global graph.*)
   deps : Mod_dep.t;
   elts_created_by_mod : Oug_types.Elt_set.t Oug_types.Elt_map.t;
}
val create : unit -> [ `Raw ] t
val size : 'a t -> int * int
size t returns the pair (number of nodes, number of edges).
val get_elt : 'a t -> Oug_types.elt Oug_tmap.key -> Oug_types.elt
val get_elt_intf : 'a t ->
Oug_types.elt_id ->
Oug_types.elt_id Oug_env.Interface.t * (string * Oug_types.elt_id) list
val get_elt_env : 'a t -> Oug_mod.Elt_map.key -> Oug_types.elt_id Oug_env.t
val get_module_id : 'a t -> ?intf:bool option -> string -> Oug_types.elt_id option
val get_orig_mod : 'a t ->
Oug_types.elt_id -> Oug_mod.t * Oug_types.elt_id Oug_types.Elt_map.t
val elts_created_by_mod : 'a t -> Oug_types.elt_id -> Oug_types.Elt_set.t
val add_group : [ `Raw ] t -> unit Oug_tmap.key * [ `Raw ] t
val add_elt : [ `Raw ] t ->
Oug_types.elt -> Oug_types.elt Oug_tmap.key * [ `Raw ] t
val add_module : [ `Raw ] t -> Oug_mod.t -> [ `Raw ] t
val store : [ `Raw ] t -> string -> unit
Binary output into a file.
val load : string -> [ `Raw ] t
Binary loading from a file.
val add_depend : [ `Raw ] t ->
src:Oug_mod.Graph.key ->
data:Oug_mod.Graph.edge_data -> dst:Oug_mod.Graph.key -> [ `Raw ] t

Dependencies


val module_dependency_graph : 'a t -> Mod_dep.t
Dependency graph of modules.
val module_dependency_order : 'a t -> Oug_types.elt_id list
Dependencies of modules as a list.
val update_mod_deps : 'a t -> 'a t
Update module dependencies stored in t.

Export edges


val add_export_edges : 'a t -> 'a t
Add export edges from elements of interface top modules to elements of implementation modules.

Dot output


val dot_of_data : 'a t -> string
val dot_file_of_data : 'a t -> ?fdot:('a t -> string) -> string -> unit
val dbg_dot : ?level:int -> ?loc:string -> 'a t -> string -> unit
val dot_of_mod_dep_graph : 'a t -> Mod_dep.t -> string
val dot_file_of_mod_dep_graph : 'a t -> Mod_dep.t -> string -> unit

Handling pending actions


val fix_point : ('a -> 'a) -> 'a -> 'a
val do_pending_actions : [ `Raw ] t -> 'a t

Reducing graph


val reduce_aliases : [ `Raw ] t -> [ `Raw ] t
val reduce_expressions : [ `Raw ] t -> [ `Raw ] t
val add_reversed_use_where_contain : [ `Raw ] t -> [ `Raw ] t