You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.7 KiB

(*
* Copyright (c) 2009 - 2013 Monoidics ltd.
* Copyright (c) 2013 - present Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*)
open! IStd
(** Control Flow Graph for Interprocedural Analysis *)
(** A control-flow graph is a collection of all the CFGs for the procedure names in a file *)
type t = Procdesc.t Typ.Procname.Hash.t
val load : SourceFile.t -> t option
(** Load the cfgs of the procedures of a source file *)
val get_all_proc_names : t -> Typ.Procname.t list
(** get all the keys from the hashtable *)
(** {2 Functions for manipulating an interprocedural CFG} *)
val create : unit -> t
(** create a new empty cfg *)
val create_proc_desc : t -> ProcAttributes.t -> Procdesc.t
(** Create a new procdesc and add it to the cfg *)
val iter_all_nodes : ?sorted:bool -> (Procdesc.t -> Procdesc.Node.t -> unit) -> t -> unit
(** Iterate over all the nodes in the cfg *)
val is_proc_cfg_connected : Procdesc.t -> bool
(** checks whether a cfg for the given procdesc is connected or not *)
val save_attributes : SourceFile.t -> t -> unit
(** Save the .attr files for the procedures in the cfg. *)
val inline_java_synthetic_methods : t -> unit
(** Inline the java synthetic methods in the cfg (in-place) *)
val merge : src:t -> dst:t -> t
(** Best-effort merge of [src] into [dst]. If a procedure is both in [dst] and [src], the one in
[src] will get overwritten. *)
val pp_proc_signatures : Format.formatter -> t -> unit
module SQLite : SqliteUtils.Data with type t = t