IR.Cfg
Control Flow Graph for Interprocedural Analysis
type t = Procdesc.t IR.Procname.Hash.t
A control-flow graph is a collection of all the CFGs for the procedure names in a file
val get_all_defined_proc_names : t -> Procname.t list
get all the procedure names that are defined in the current file
val store : IBase.SourceFile.t -> t -> unit
Save the individual Procdesc.t
and ProcAttributes.t
to the database for the procedures in the cfg.
val create : unit -> t
create a new empty cfg
val create_proc_desc : t -> ProcAttributes.t -> Procdesc.t
Create a new procdesc. If the procedure is defined, you need to create and set the start/exit nodes after creating the procedure.
val iter_sorted : t -> f:(Procdesc.t -> unit) -> unit
Iterate over all the proc descs in the cfg in ascending order
val fold_sorted : t -> init:'a -> f:('a -> Procdesc.t -> 'a) -> 'a
Fold over all the proc descs in the cfg in ascending order
val pp_proc_signatures : Stdlib.Format.formatter -> t -> unit