Changed from type to module for cfg and moved to separate lib
This commit is contained in:
38
lib/cfg/Cfg.mli
Normal file
38
lib/cfg/Cfg.mli
Normal file
@ -0,0 +1,38 @@
|
||||
module type PrintableType = sig
|
||||
type t
|
||||
val pp : out_channel -> t -> unit
|
||||
val pplist : out_channel -> t list -> unit
|
||||
end
|
||||
|
||||
module Node : sig
|
||||
type t
|
||||
val compare : t -> t -> int
|
||||
val create : unit -> t
|
||||
end
|
||||
|
||||
module NodeMap : Map.S with type key = Node.t
|
||||
module NodeSet : Set.S with type elt = Node.t
|
||||
|
||||
module type C = sig
|
||||
type elt
|
||||
type t = {
|
||||
empty: bool;
|
||||
nodes: NodeSet.t;
|
||||
edges: (Node.t * (Node.t option)) NodeMap.t;
|
||||
reverseEdges: (Node.t list) NodeMap.t;
|
||||
inputVal: elt option;
|
||||
outputVal: elt option;
|
||||
initial: Node.t option;
|
||||
terminal: Node.t option;
|
||||
content: elt list NodeMap.t
|
||||
}
|
||||
|
||||
val create : unit -> t
|
||||
val merge : t -> t -> Node.t -> Node.t -> t
|
||||
val concat : t -> t -> t
|
||||
val addToLastNode : elt -> t -> t
|
||||
|
||||
val pp : out_channel -> t -> unit
|
||||
end
|
||||
|
||||
module Make (M: PrintableType) : C with type elt = M.t
|
||||
Reference in New Issue
Block a user