`sig
exception Unreachable
module type G =
sig
type t
module V : Sig.COMPARABLE
val pred : Dominator.G.t -> V.t -> V.t list
val succ : Dominator.G.t -> V.t -> V.t list
val fold_vertex : (V.t -> 'a -> 'a) -> Dominator.G.t -> 'a -> 'a
val iter_vertex : (V.t -> unit) -> Dominator.G.t -> unit
val nb_vertex : Dominator.G.t -> int
val create : ?size:int -> unit -> Dominator.G.t
val add_edge : Dominator.G.t -> V.t -> V.t -> unit
end
module Make :
functor (G : G) ->
sig
module S :
sig
type elt = G.V.t
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> t * bool * t
end
type idom = G.V.t -> G.V.t
type idoms = G.V.t -> G.V.t -> bool
type dom_tree = G.V.t -> G.V.t list
type dominators = G.V.t -> G.V.t list
type dom = G.V.t -> G.V.t -> bool
type sdom = G.V.t -> G.V.t -> bool
type dom_frontier = G.V.t -> G.V.t list
type dom_graph = unit -> Dominator.G.t
type dom_functions = {
idom : Dominator.Make.idom;
idoms : Dominator.Make.idoms;
dom_tree : Dominator.Make.dom_tree;
dominators : Dominator.Make.dominators;
dom : Dominator.Make.dom;
sdom : Dominator.Make.sdom;
dom_frontier : Dominator.Make.dom_frontier;
dom_graph : Dominator.Make.dom_graph;
}
val compute_idom : Dominator.G.t -> G.V.t -> G.V.t -> G.V.t
val dominators_to_dom :
('a -> Dominator.Make.S.t) -> Dominator.Make.S.elt -> 'a -> bool
val dominators_to_sdom :
(G.V.t -> Dominator.Make.S.t) ->
Dominator.Make.S.elt -> G.V.t -> bool
val dom_to_sdom : (G.V.t -> G.V.t -> bool) -> G.V.t -> G.V.t -> bool
val dominators_to_sdominators :
(Dominator.Make.S.elt -> Dominator.Make.S.t) ->
Dominator.Make.S.elt -> Dominator.Make.S.t
val dominators_to_idoms :
(Dominator.Make.S.elt -> Dominator.Make.S.t) ->
Dominator.Make.S.elt -> Dominator.Make.S.elt -> bool
val dominators_to_dom_tree :
Dominator.G.t ->
?pred:(Dominator.G.t ->
Dominator.Make.S.elt -> Dominator.Make.S.elt list) ->
(Dominator.Make.S.elt -> Dominator.Make.S.t) ->
Dominator.Make.S.elt -> Dominator.Make.S.t
val idom_to_dom_tree :
Dominator.G.t -> (G.V.t -> G.V.t) -> G.V.t -> G.V.t list
val idom_to_idoms : Dominator.Make.idom -> G.V.t -> G.V.t -> bool
val compute_dom_frontier :
Dominator.G.t ->
Dominator.Make.dom_tree ->
Dominator.Make.idom -> G.V.t -> G.V.t list
val idom_to_dominators : ('a -> 'a) -> 'a -> 'a list
val idom_to_dom : (G.V.t -> G.V.t) -> G.V.t -> G.V.t -> bool
val compute_dom_graph :
Dominator.G.t -> Dominator.Make.dom_tree -> Dominator.G.t
val compute_all :
Dominator.G.t -> G.V.t -> Dominator.Make.dom_functions
end
end`