Files
lci/lib/cfg/Cfg.mli

41 lines
890 B
OCaml
Raw Normal View History

module type PrintableType = sig
type t
val pp : out_channel -> t -> unit
val pplist : out_channel -> t list -> unit
end
module Node : sig
2024-11-27 20:18:30 +01:00
type t = {
id: int
}
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;
2024-11-27 20:18:30 +01:00
inputVal: int option;
inputOutputVar: (string * string) option;
initial: Node.t option;
terminal: Node.t option;
content: elt list NodeMap.t
}
2024-11-27 20:18:30 +01:00
val empty : 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