This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
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>InferIR__Procdesc (InferIR.InferIR__Procdesc)</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">InferIR</a>» InferIR__Procdesc</nav><h1>Module <code>InferIR__Procdesc</code></h1><h2id="per-procedure-cfg"><ahref="#per-procedure-cfg"class="anchor"></a>Per-procedure CFG</h2></header><divclass="spec module"id="module-NodeKey"><ahref="#module-NodeKey"class="anchor"></a><code><spanclass="keyword">module</span><ahref="NodeKey/index.html">NodeKey</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div><dl><dtclass="spec module"id="module-Node"><ahref="#module-Node"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Node/index.html">Node</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></dt><dd><p>node of the control flow graph</p></dd></dl><dl><dtclass="spec module"id="module-IdMap"><ahref="#module-IdMap"class="anchor"></a><code><spanclass="keyword">module</span> IdMap : <ahref="../../InferStdlib/InferStdlib/PrettyPrintable/index.html#module-type-PPMap">InferStdlib.PrettyPrintable.PPMap</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../../InferStdlib/InferStdlib/PrettyPrintable/index.html#module-type-PPMap">PPMap</a>.key = <ahref="Node/index.html#type-id">Node.id</a></code></dt><dd><p>Map with node id keys.</p></dd></dl><dl><dtclass="spec module"id="module-NodeHash"><ahref="#module-NodeHash"class="anchor"></a><code><spanclass="keyword">module</span> NodeHash : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Hashtbl.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeHash">NodeHash</a>.key = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Hash table with nodes as keys.</p></dd></dl><dl><dtclass="spec module"id="module-NodeMap"><ahref="#module-NodeMap"class="anchor"></a><code><spanclass="keyword">module</span> NodeMap : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Map.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeMap">NodeMap</a>.key = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Map over nodes.</p></dd></dl><dl><dtclass="spec module"id="module-NodeSet"><ahref="#module-NodeSet"class="anchor"></a><code><spanclass="keyword">module</span> NodeSet : <ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Caml.Set.S <spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="index.html#module-NodeSet">NodeSet</a>.elt = <ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Set of nodes.</p></dd></dl><aside><p>procedure descriptions</p></aside><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code></dt><dd><p>proc description</p></dd></dl><dl><dtclass="spec value"id="val-append_locals"><ahref="#val-append_locals"class="anchor"></a><code><spanclass="keyword">val</span> append_locals : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a> list</span><span>-></span> unit</code></dt><dd><p>append a list of new local variables to the existing list of local variables</p></dd></dl><dl><dtclass="spec value"id="val-compute_distance_to_exit_node"><ahref="#val-compute_distance_to_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> compute_distance_to_exit_node : <ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>Compute the distance of each node to the exit node, if not computed already</p></dd></dl><dl><dtclass="spec value"id="val-create_node"><ahref="#val-create_node"class="anchor"></a><code><spanclass="keyword">val</span> create_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="Node/index.html#type-nodekind">Node.nodekind</a><span>-></span><span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a> list</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dd><p>Create a new cfg node with the given location, kind, list of instructions, and add it to the procdesc.</p></dd></dl><dl><dtclass="spec value"id="val-create_node_from_not_reversed"><ahref="#val-create_node_from_not_reversed"class="anchor"></a><code><spanclass="keyword">val</span> create_node_from_not_reversed : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a><span>-></span><ahref="Node/index.html#type-nodekind">Node.nodekind</a><span>-></span><ahref="../InferIR/Instrs/index.html#type-not_reversed_t">InferIR.Instrs.not_reversed_t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-fold_instrs"><ahref="#val-fold_instrs"class="anchor"></a><code><spanclass="keyword">val</span> fold_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold over all nodes and their instructions</p></dd></dl><dl><dtclass="spec value"id="val-find_map_instrs"><ahref="#val-find_map_instrs"class="anchor"></a><code><spanclass="keyword">val</span> find_map_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><span>-></span><span><spanclass="type-var">'a</span> option</span>)</span></span><span>-></span><span><spanclass="type-var">'a</span> option</span></code></dt><dtclass="spec value"id="val-from_proc_attributes"><ahref="#val-from_proc_attributes"class="anchor"></a><code><spanclass="keyword">val</span> from_proc_attributes : <ahref="../InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a><span>-></span><ahref="index.html#type-t">t</a></code></dt><dd><p>Use <code>Cfg.create_proc_desc</code> if you are adding a proc desc to a cfg</p></dd></dl><dl><dtclass="spec value"id="val-get_access"><ahref="#val-get_access"class="anchor"></a><code><spanclass="keyword">val</span> get_access : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/PredSymb/index.html#type-access">InferIR.PredSymb.access</a></code></dt><dd><p>Return the visibility attribute</p></dd></dl><dl><dtclass="spec value"id="val-get_attributes"><ahref="#val-get_attributes"class="anchor"></a><code><spanclass="keyword">val</span> get_attributes : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a></code></dt><dd><p>Get the attributes of the procedure.</p></dd></dl><dl><dtclass="spec value"id="val-set_attributes"><ahref="#val-set_attributes"class="anchor"></a><code><spanclass="keyword">val</span> set_attributes : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/ProcAttributes/index.html#type-t">InferIR.ProcAttributes.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-get_captured"><ahref="#val-get_captured"class="anchor"></a><code><spanclass="keyword">val</span> get_captured : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../InferIR/Mangled/index.html#type-t">InferIR.Mangled.t</a> * <ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>)</span> list</span></code></dt><dd><p>Return name and type of block's captured variables</p></dd></dl><dl><dtclass="spec value"id="val-get_exit_node"><ahref="#val-get_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> get_exit_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-get_formals"><ahref="#val-get_formals"class="anchor"></a><code><spanclass="keyword">val</span> get_formals : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../InferIR/Mangled/index.html#type-t">InferIR.Mangled.t</a> * <ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>)</span> list</span></code></dt><dd><p>Return name and type of formal parameters</p></dd></dl><dl><dtclass="spec value"id="val-get_pvar_formals"><ahref="#val-get_pvar_formals"class="anchor"></a><code><spanclass="keyword">val</span> get_pvar_formals : <ahref="index.html#type-t">t</a><span>-></span><span><span>(<ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a> * <ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a>)</span> list</span></code></dt><dd><p>Return pvar and type of formal parameters</p></dd></dl><dl><dtclass="spec value"id="val-get_loc"><ahref="#val-get_loc"class="anchor"></a><code><spanclass="keyword">val</span> get_loc : <ahref="index.html#type-t">t</a><span>-></span><ahref="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></dt><dd><p>Return loc information for the procedure</p></dd></dl><dl><dtclass="spec value"id="val-get_locals"><ahref="#val-get_locals"class="anchor"></a><code><spanclass="keyword">val</span> get_locals : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a> list</span></code></dt><dd><p>Return name and type and attributes of local variables</p></dd></dl><dl><dtclass="spec value"id="val-get_nodes"><ahref="#val-get_nodes"class="anchor"></a><code><spanclass="keyword">val</span> get_nodes : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span></code></dt><dtclass="spec value"id="val-get_nodes_num"><ahref="#val-get_nodes_num"class="anchor"></a><code><spanclass="keyword">val</span> get_nodes_num : <ahref="index.html#type-t">t</a><span>-></span> int</code></dt><dtclass="spec value"id="val-get_proc_name"><ahref="#val-get_proc_name"class="anchor"></a><code><spanclass="keyword">val</span> get_proc_name : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a></code></dt><dtclass="spec value"id="val-get_ret_type"><ahref="#val-get_ret_type"class="anchor"></a><code><spanclass="keyword">val</span> get_ret_type : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Typ/index.html#type-t">InferIR.Typ.t</a></code></dt><dd><p>Return the return type of the procedure and type string</p></dd></dl><dl><dtclass="spec value"id="val-has_added_return_param"><ahref="#val-has_added_return_param"class="anchor"></a><code><spanclass="keyword">val</span> has_added_return_param : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-get_ret_var"><ahref="#val-get_ret_var"class="anchor"></a><code><spanclass="keyword">val</span> get_ret_var : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a></code></dt><dtclass="spec value"id="val-get_start_node"><ahref="#val-get_start_node"class="anchor"></a><code><spanclass="keyword">val</span> get_start_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a></code></dt><dtclass="spec value"id="val-get_static_callees"><ahref="#val-get_static_callees"class="anchor"></a><code><spanclass="keyword">val</span> get_static_callees : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a> list</span></code></dt><dd><p>get a list of unique static callees excluding self</p></dd></dl><dl><dtclass="spec value"id="val-is_defined"><ahref="#val-is_defined"class="anchor"></a><code><spanclass="keyword">val</span> is_defined : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Return <code>true</code> iff the procedure is defined, and not just declared</p></dd></dl><dl><dtclass="spec value"id="val-is_java_synchronized"><ahref="#val-is_java_synchronized"class="anchor"></a><code><spanclass="keyword">val</span> is_java_synchronized : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dd><p>Return <code>true</code> if the procedure signature has the Java synchronized keyword</p></dd></dl><dl><dtclass="spec value"id="val-iter_instrs"><ahref="#val-iter_instrs"class="anchor"></a><code><spanclass="keyword">val</span> iter_instrs : <span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><span>-></span> unit)</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>iterate over all nodes and their instructions</p></dd></dl><dl><dtclass="spec value"id="val-replace_instrs"><ahref="#val-replace_instrs"class="anchor"></a><code><spanclass="keyword">val</span> replace_instrs : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><span>-></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a>)</span></span><span>-></span> bool</code></dt><dd><p>Map and replace the instructions to be executed. Returns true if at least one substitution occured.</p></dd></dl><dl><dtclass="spec value"id="val-replace_instrs_by"><ahref="#val-replace_instrs_by"class="anchor"></a><code><spanclass="keyword">val</span> replace_instrs_by : <ahref="index.html#type-t">t</a><span>-></span><span>f:<span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a><span>-></span><span><ahref="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a> array</span>)</span></span><span>-></span> bool</code></dt><dd><p>Like <code>replace_instrs</code>, but slower, and each instruction may be replaced by 0, 1, or more instructions.</p></dd></dl><dl><dtclass="spec value"id="val-iter_nodes"><ahref="#val-iter_nodes"class="anchor"></a><code><spanclass="keyword">val</span> iter_nodes : <span>(<ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit)</span><span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dd><p>iterate over all the nodes of a procedure</p></dd></dl><dl><dtclass="spec value"id="val-fold_nodes"><ahref="#val-fold_nodes"class="anchor"></a><code><spanclass="keyword">val</span> fold_nodes : <ahref="index.html#type-t">t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold over all the nodes of a procedure</p></dd></dl><dl><dtclass="spec value"id="val-fold_slope_range"><ahref="#val-fold_slope_range"class="anchor"></a><code><spanclass="keyword">val</span> fold_slope_range : <ahref="Node/index.html#type-t">Node.t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><span>init:<spanclass="type-var">'accum</span></span><span>-></span><span>f:<span>(<spanclass="type-var">'accum</span><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><spanclass="type-var">'accum</span>)</span></span><span>-></span><spanclass="type-var">'accum</span></code></dt><dd><p>fold between two nodes or until we reach a branching structure</p></dd></dl><dl><dtclass="spec value"id="val-set_succs_exn_only"><ahref="#val-set_succs_exn_only"class="anchor"></a><code><spanclass="keyword">val</span> set_succs_exn_only : <ahref="Node/index.html#type-t">Node.t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span><span>-></span> unit</code></dt><dtclass="spec value"id="val-node_set_succs_exn"><ahref="#val-node_set_succs_exn"class="anchor"></a><code><spanclass="keyword">val</span> node_set_succs_exn : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a> list</span><span>-></span> unit</code></dt><dd><p>Set the successor nodes and exception nodes, and build predecessor links</p></dd></dl><dl><dtclass="spec value"id="val-set_exit_node"><ahref="#val-set_exit_node"class="anchor"></a><code><spanclass="keyword">val</span> set_exit_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit</code></dt><dd><p>Set the exit node of the procedure</p></dd></dl><dl><dtclass="spec value"id="val-set_start_node"><ahref="#val-set_start_node"class="anchor"></a><code><spanclass="keyword">val</span> set_start_node : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-get_wto"><ahref="#val-get_wto"class="anchor"></a><code><spanclass="keyword">val</span> get_wto : <ahref="index.html#type-t">t</a><span>-></span><span><ahref="Node/index.html#type-t">Node.t</a><ahref="../InferIR/WeakTopologicalOrder/Partition/index.html#type-t">InferIR.WeakTopologicalOrder.Partition.t</a></span></code></dt><dtclass="spec value"id="val-is_loop_head"><ahref="#val-is_loop_head"class="anchor"></a><code><spanclass="keyword">val</span> is_loop_head : <ahref="index.html#type-t">t</a><span>-></span><ahref="Node/index.html#type-t">Node.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-pp_signature"><ahref="#val-pp_signature"class="anchor"></a><code><spanclass="keyword">val</span> pp_signature : Stdlib.Format.formatter <span>-></span><ahref="index.html#type-t">t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-pp_local"><ahref="#val-pp_local"class="anchor"></a><code><spanclass="keyword">val</span> pp_local : Stdlib.Format.formatter <span>-></span><ahref="../InferIR/ProcAttributes/index.html#type-var_data">InferIR.ProcAttributes.var_data</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-is_specialized"><ahref="#val-is_specialized"class="anchor"></a><code><spanclass="keyword">val</span> is_specialized : <ahref="index.html#type-t">t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-is_captured_pvar"><ahref="#val-is_captured_pvar"class="anchor"></a><code><spanclass="keyword">val</span> is_captured_pvar : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span> bool</code></dt><dd><p>true if pvar is a captured variable of a cpp lambda or obcj block</p></dd></dl><dl><dtclass="spec value"id="val-is_captured_var"><ahref="#val-is_captured_var"class="anchor"></a><code><spanclass="keyword">val</span> is_captured_var : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Var/index.html#type-t">InferIR.Var.t</a><span>-></span> bool</code></dt><dd><p>true if var is a captured variable of a cpp lambda or obcj block</p></dd></dl><dl><dtclass="spec value"id="val-has_modify_in_block_attr"><ahref="#val-has_modify_in_block_attr"class="anchor"></a><code><spanclass="keyword">val</span> has_modify_in_block_attr : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferIR/Pvar/index.html#type-t">InferIR.Pvar.t</a><span>-></span> bool</code></dt><dtclass="spec value"id="val-is_connected"><ahref="#val-is_connected"class="anchor"></a><code><spanclass="keyword">val</span> is_connected : <ahref="index.html#type-t">t</a><span>-></span><span><span>(unit,<span>[ `Join <span>| `Other</span> ]</span>)</span><ahref="../../InferStdlib/InferStdlib/index.html#module-IStd">InferStdlib.IStd</a>.Result.t</span></code></dt><dd><p>checks whether a cfg for the given procdesc is connected or not</p></dd></dl><dl><dtclass="spec module"id="module-SQLite"><ahref="#module-SQLite"class="anchor"></a><code><spanclass="keyword">module</span><ahref="SQLite/index.html">SQLite</a> : <ahref="../../InferBase/InferBase/SqliteUtils/index.html#module-type-Data">InferBase.SqliteUtils.Data</a><spanclass="keyword">with</span><spanclass="keyword">type</span><ahref="../../InferBase/InferBase/SqliteUtils/module-type-Data/index.html#type-t">t</a> = <span><ahref="index.html#type-t">t</a> option</span></code></dt><dd><p>per-procedure CFGs are stored in the SQLite "procedures" table as NULL if the procedure has no CFG</p></dd></dl><dl><dtclass="spec value"id="val-load"><ahref="#val-load"class="anchor"></a><code><spanclass="keyword">val</span> load : <ahref="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a><span>-></span><span><ahref="index.html#type-t">t</a> option</span></code></dt></dl></div></body></html>