sig
module DepG :
sig
type t
module V :
sig
type t
val compare : t -> t -> int
val hash : t -> int
val equal : t -> t -> bool
type label = string
val create : label -> t
val label : t -> label
end
type vertex = V.t
module E :
sig
type t
val compare : t -> t -> int
type vertex = vertex
val src : t -> vertex
val dst : t -> vertex
type label = string
val create : vertex -> label -> vertex -> t
val label : t -> label
end
type edge = E.t
val is_directed : bool
val is_empty : t -> bool
val nb_vertex : t -> int
val nb_edges : t -> int
val out_degree : t -> vertex -> int
val in_degree : t -> vertex -> int
val mem_vertex : t -> vertex -> bool
val mem_edge : t -> vertex -> vertex -> bool
val mem_edge_e : t -> edge -> bool
val find_edge : t -> vertex -> vertex -> edge
val find_all_edges : t -> vertex -> vertex -> edge list
val succ : t -> vertex -> vertex list
val pred : t -> vertex -> vertex list
val succ_e : t -> vertex -> edge list
val pred_e : t -> vertex -> edge list
val iter_vertex : (vertex -> unit) -> t -> unit
val fold_vertex : (vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges : (vertex -> vertex -> unit) -> t -> unit
val fold_edges : (vertex -> vertex -> 'a -> 'a) -> t -> 'a -> 'a
val iter_edges_e : (edge -> unit) -> t -> unit
val fold_edges_e : (edge -> 'a -> 'a) -> t -> 'a -> 'a
val map_vertex : (vertex -> vertex) -> t -> t
val iter_succ : (vertex -> unit) -> t -> vertex -> unit
val iter_pred : (vertex -> unit) -> t -> vertex -> unit
val fold_succ : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val fold_pred : (vertex -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_succ_e : (edge -> unit) -> t -> vertex -> unit
val fold_succ_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val iter_pred_e : (edge -> unit) -> t -> vertex -> unit
val fold_pred_e : (edge -> 'a -> 'a) -> t -> vertex -> 'a -> 'a
val create : ?size:int -> unit -> t
val clear : t -> unit
val copy : t -> t
val add_vertex : t -> vertex -> unit
val remove_vertex : t -> vertex -> unit
val add_edge : t -> vertex -> vertex -> unit
val add_edge_e : t -> edge -> unit
val remove_edge : t -> vertex -> vertex -> unit
val remove_edge_e : t -> edge -> unit
module Mark :
sig
type graph = t
type vertex = vertex
val clear : graph -> unit
val get : vertex -> int
val set : vertex -> int -> unit
end
end
type t = {
m_name : string;
m_fsms : Fsm.inst list;
m_inputs : (string * Sysm.global) list;
m_outputs : (string * Sysm.global) list;
m_types : (string * Types.typ) list;
m_fns : (string * Sysm.global) list;
m_consts : (string * Sysm.global) list;
m_shared : (string * Sysm.global) list;
m_deps : Sysm.dependencies;
}
and global = Types.typ * Sysm.mg_desc
and mg_desc =
MInp of Global.stim_desc * string list
| MOutp of string list
| MFun of string list * Expr.t
| MConst of Expr.value
| MShared of string list * string list
and dependencies = {
md_graph : Sysm.DepG.t;
md_node : string -> Sysm.DepG.V.t;
}
exception Illegal_const_expr of Expr.t
val build :
name:string ->
?gtyps:(string * Types.typ) list ->
?gfns:(string * Sysm.global) list ->
?gcsts:(string * Sysm.global) list -> Fsm.inst list -> Sysm.t
val dot_output :
string ->
?dot_options:Utils.Dot.graph_style list ->
?fsm_options:Fsm.dot_options list ->
?with_insts:bool -> ?with_models:bool -> Sysm.t -> string list
val dump : Pervasives.out_channel -> Sysm.t -> unit
end