Module Backend__Callbacks
type proc_callback_args
=
{
summary : Backend.Summary.t;
exe_env : Absint.Exe_env.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 proc_callback_t
= proc_callback_args -> Backend.Summary.t
type file_callback_args
=
{
procedures : IR.Procname.t list;
source_file : IBase.SourceFile.t;
exe_env : Absint.Exe_env.t;
}
type file_callback_t
= file_callback_args -> Absint.IssueLog.t
Result is a list of additional issues found at this stage (complementary to issues generated on per-procedure analysis stage)
val register_procedure_callback : checker_name:string -> ?dynamic_dispatch:bool -> IBase.Language.t -> proc_callback_t -> unit
Register a procedure callback (see details above)
val register_file_callback : checker_name:string -> IBase.Language.t -> file_callback_t -> issue_dir:IBase.ResultsDirEntryName.id -> unit
Register a file callback (see details above).
issues_dir
must be unique for this type of checker.
val iterate_procedure_callbacks : Absint.Exe_env.t -> Backend.Summary.t -> Backend.Summary.t
Invoke all registered procedure callbacks on the given procedure.
val iterate_file_callbacks_and_store_issues : IR.Procname.t list -> Absint.Exe_env.t -> IBase.SourceFile.t -> unit
Invoke all registered file callbacks on a file, and store produced errors in a corresponding directory. Guaranteed to be called after all procedure-level callbacks are invoked