This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>Callbacks (infer.InferModules.Callbacks)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">InferModules</a>» Callbacks</nav><h1>Module <code>InferModules.Callbacks</code></h1></header><aside><p>Module to register and invoke callbacks</p></aside><dl><dtclass="spec type"id="type-proc_callback_args"><ahref="#type-proc_callback_args"class="anchor"></a><code><spanclass="keyword">type</span> proc_callback_args</code><code> = </code><code>{</code><tableclass="record"><trid="type-proc_callback_args.get_procs_in_file"class="anchored"><tdclass="def field"><ahref="#type-proc_callback_args.get_procs_in_file"class="anchor"></a><code>get_procs_in_file : <ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> list</span>;</code></td></tr><trid="type-proc_callback_args.summary"class="anchored"><tdclass="def field"><ahref="#type-proc_callback_args.summary"class="anchor"></a><code>summary : <ahref="../Summary/index.html#type-t">Summary.t</a>;</code></td></tr><trid="type-proc_callback_args.exe_env"class="anchored"><tdclass="def field"><ahref="#type-proc_callback_args.exe_env"class="anchor"></a><code>exe_env : <ahref="../Exe_env/index.html#type-t">Exe_env.t</a>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-proc_callback_t"><ahref="#type-proc_callback_t"class="anchor"></a><code><spanclass="keyword">type</span> proc_callback_t</code><code> = <ahref="index.html#type-proc_callback_args">proc_callback_args</a><span>-></span><ahref="../Summary/index.html#type-t">Summary.t</a></code></dt><dd><p>Type of a procedure callback:</p><ul><li>List of all the procedures the callback will be called on.</li><li>get_proc_desc to get a proc desc from a proc name</li><li>Type environment.</li><li>Procedure for the callback to act on.</li></ul></dd></dl><dl><dtclass="spec type"id="type-cluster_callback_args"><ahref="#type-cluster_callback_args"class="anchor"></a><code><spanclass="keyword">type</span> cluster_callback_args</code><code> = </code><code>{</code><tableclass="record"><trid="type-cluster_callback_args.procedures"class="anchored"><tdclass="def field"><ahref="#type-cluster_callback_args.procedures"class="anchor"></a><code>procedures : <span><span>(<ahref="../../../InferIR/InferIR/Tenv/index.html#type-t">InferIR.Tenv.t</a> * <ahref="../Summary/index.html#type-t">Summary.t</a>)</span> list</span>;</code></td></tr><trid="type-cluster_callback_args.source_file"class="anchored"><tdclass="def field"><ahref="#type-cluster_callback_args.source_file"class="anchor"></a><code>source_file : <ahref="../../../InferBase/InferBase/SourceFile/index.html#type-t">InferBase.SourceFile.t</a>;</code></td></tr><trid="type-cluster_callback_args.exe_env"class="anchored"><tdclass="def field"><ahref="#type-cluster_callback_args.exe_env"class="anchor"></a><code>exe_env : <ahref="../Exe_env/index.html#type-t">Exe_env.t</a>;</code></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-cluster_callback_t"><ahref="#type-cluster_callback_t"class="anchor"></a><code><spanclass="keyword">type</span> cluster_callback_t</code><code> = <ahref="index.html#type-cluster_callback_args">cluster_callback_args</a><span>-></span> unit</code></dt></dl><dl><dtclass="spec value"id="val-register_procedure_callback"><ahref="#val-register_procedure_callback"class="anchor"></a><code><spanclass="keyword">val</span> register_procedure_callback : <span>name:string</span><span>-></span><span>?⁠dynamic_dispatch:bool</span><span>-></span><ahref="../../../InferBase/InferBase/Language/index.html#type-t">InferBase.Language.t</a><span>-></span><ahref="index.html#type-proc_callback_t">proc_callback_t</a><span>-></span> unit</code></dt><dd><p>register a procedure callback</p></dd></dl><dl><dtclass="spec value"id="val-register_cluster_callback"><ahref="#val-register_cluster_callback"class="anchor"></a><code><spanclass="keyword">val</span> register_cluster_callback : <span>name:string</span><span>-></span><ahref="../../../InferBase/InferBase/Language/index.html#type-t">InferBase.Language.t</a><span>-></span><ahref="index.html#type-cluster_callback_t">cluster_callback_t</a><span>-></span> unit</code></dt><dd><p>register a cluster callback</p></dd></dl><dl><dtclass="spec value"id="val-iterate_procedure_callbacks"><ahref="#val-iterate_procedure_callbacks"class="anchor"></a><code><spanclass="keyword">val</span> iterate_procedure_callbacks : <ahref="../Exe_env/index.html#type-t">Exe_env.t</a><span>-></span><ahref="../Summary/index.html#type-t">Summary.t</a><span>-></span><ahref="../Summary/index.html#type-t">Summary.t</a></code></dt><dd><p>Invoke all registered procedure callbacks on the given procedure.</p></dd></dl><dl><dtclass="spec value"id="val-iterate_cluster_callbacks"><ahref="#val-iterate_cluster_callbacks"class="anchor"></a><code><spanclass="keyword">val</span> iterate_cluster_callbacks : <span><ahref="../../../InferIR/InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><ahref="../../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.sexp_list</span><span>-></span><ahref="../Exe_env/index.html#type-t">Exe_env.t</a><span>-></span><ahref="../../../InferBase/InferBase/SourceFile/index.html#type-t">InferBase.SourceFile.t</a><span>-></span> unit</code></dt><dd><p>Invoke all registered cluster callbacks on a cluster of procedures.</p></dd></dl></div></body></html>