Files
lci/lib/analysis/Cfg.mli

49 lines
1000 B
OCaml
Raw Permalink Normal View History

module type PrintableType = sig
type t
val pp : out_channel -> t -> unit
val pp_list : out_channel -> t list -> unit
end
module Node : sig
2024-11-27 20:18:30 +01:00
type t = {
2024-12-12 16:37:36 +01:00
id: int;
2024-11-27 20:18:30 +01:00
}
val compare : t -> t -> int
val create : unit -> t
end
2024-12-02 00:45:24 +01:00
module NodeMap : sig
include Map.S with type key = Node.t
val add_to_list_last : key -> 'a -> 'a list t -> 'a list t
end
module NodeSet : Set.S with type elt = Node.t
2024-12-12 16:37:36 +01:00
type 'a cfginternal = {
empty: bool;
nodes: NodeSet.t;
edges: (Node.t * (Node.t option)) NodeMap.t;
reverse_edges: (Node.t list) NodeMap.t;
input_val: int option;
input_output_var: (string * string) option;
2024-12-12 16:37:36 +01:00
initial: Node.t option;
terminal: Node.t option;
content: 'a list NodeMap.t;
}
module type C = sig
type elt
2024-12-12 16:37:36 +01:00
type t = elt cfginternal
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 add_to_last_node : elt -> t -> t
val pp : out_channel -> t -> unit
end
module Make (M: PrintableType) : C with type elt = M.t