Module InferModules.Callbacks
type proc_callback_args
=
{
get_procs_in_file : InferIR.Typ.Procname.t -> InferIR.Typ.Procname.t list;
summary : Summary.t;
exe_env : Exe_env.t;
}
type proc_callback_t
= proc_callback_args -> Summary.t
Type of a procedure callback:
- List of all the procedures the callback will be called on.
- get_proc_desc to get a proc desc from a proc name
- Type environment.
- Procedure for the callback to act on.
type cluster_callback_args
=
{
procedures : (InferIR.Tenv.t * Summary.t) list;
source_file : InferBase.SourceFile.t;
exe_env : Exe_env.t;
}
type cluster_callback_t
= cluster_callback_args -> unit
val register_procedure_callback : name:string -> ?dynamic_dispatch:bool -> InferBase.Language.t -> proc_callback_t -> unit
register a procedure callback
val register_cluster_callback : name:string -> InferBase.Language.t -> cluster_callback_t -> unit
register a cluster callback
val iterate_procedure_callbacks : Exe_env.t -> Summary.t -> Summary.t
Invoke all registered procedure callbacks on the given procedure.
val iterate_cluster_callbacks : InferIR.Typ.Procname.t InferStdlib.IStd.sexp_list -> Exe_env.t -> InferBase.SourceFile.t -> unit
Invoke all registered cluster callbacks on a cluster of procedures.