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.

37 lines
1.3 KiB

(*
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
open! IStd
(** Module for on-demand analysis. *)
type analyze_ondemand = Summary.t -> Procdesc.t -> Summary.t
type get_proc_desc = Typ.Procname.t -> Procdesc.t option
type callbacks = {analyze_ondemand: analyze_ondemand; get_proc_desc: get_proc_desc}
val get_proc_desc : get_proc_desc
(** Find a proc desc for the procedure, perhaps loading it from disk. *)
val analyze_proc_desc : caller_pdesc:Procdesc.t -> Procdesc.t -> Summary.t option
(** [analyze_proc_desc ~caller_pdesc callee_pdesc] performs an on-demand analysis of callee_pdesc
triggered during the analysis of caller_pdesc *)
val analyze_proc_name : ?caller_pdesc:Procdesc.t -> Typ.Procname.t -> Summary.t option
(** [analyze_proc_name ~caller_pdesc proc_name] performs an on-demand analysis of proc_name
triggered during the analysis of caller_pdesc *)
val set_callbacks : callbacks -> unit
(** Set the callbacks used to perform on-demand analysis. *)
val unset_callbacks : unit -> unit
(** Unset the callbacks used to perform on-demand analysis. *)
val clear_cache : unit -> unit
(** empty the cache of ondemand results *)